System and method for establishing bidirectional links between multiphysics modeling and design systems

ABSTRACT

A system and method for implementing, on one or more processors, a bidirectional link between a design system and a multiphysics modeling system includes establishing via a communications link a connection between the design system and the multiphysics modeling system. Instructions are communicated via the communication link that include commands for generating a geometric representation in the design system based on parameters communicated from the multiphysics modeling system. One or more memory components can be configured to store a design system dynamic link library and a multiphysics modeling system dynamic link library. A controller can be operative to detect an installation of the design system, and implement via the dynamic link libraries, bidirectional communications of instructions between the design system and the multiphysics modeling system.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to and the benefits of U.S. ProvisionalApplication No. 61/290,839, filed on Dec. 29, 2009, U.S. ProvisionalApplication No. 61/360,038, filed Jun. 30, 2010, and U.S. ProvisionalApplication No. 61/377,841, filed on Aug. 27, 2010; this application isalso a continuation-in-part of U.S. patent application Ser. No.12/487,762, filed on Jun. 19, 2009, which is a continuation of U.S.patent application Ser. No. 10/042,936, filed on Jan. 9, 2002, nowissued as U.S. Pat. No. 7,596,474, which is a continuation-in-part ofU.S. patent application Ser. No. 09/995,222, filed on Nov. 27, 2001, nowissued as U.S. Pat. No. 7,519,518, which is a complete applicationclaiming priority to and the benefit of U.S. Provisional Application No.60/253,154, filed on Nov. 27, 2000, and U.S. patent application Ser. No.09/995,222 is also a continuation-in-part of U.S. patent applicationSer. No. 09/675,778, filed on Sep. 29, 2000, now issued as U.S. Pat. No.7,623,991, which is a complete application claiming priority to and thebenefit of U.S. Provisional Application No. 60/222,394, filed on Aug. 2,2000; the disclosures of each of the foregoing applications are herebyincorporated by reference herein in their entirety.

FIELD OF THE INVENTION

The present invention relates generally to systems and methods formodeling and simulation, and more particularly, to interfaces andcommunications between design systems and multiphysics modeling systems.

BACKGROUND

Computer-aided design systems are typically used to develop productdesigns and may be complemented with packages analyzing a single aspectof a design, such as, structural analysis in conjunction withcomputer-aided design systems. It would be desirable to have designsystems that can operate in more complex environments.

SUMMARY OF THE INVENTION

According to one aspect of the present disclosure, a method isexecutable on one or more processors for implementing a bidirectionallink between a design system and a multiphysics modeling system. Themethod includes the acts of establishing via a communications link aconnection between the design system and the multiphysics modelingsystem. Instructions are communicated via the communication link. Theinstructions are configured to include commands for generating ageometric representation in the design system based on parameterscommunicated from the multiphysics modeling system.

According to another aspect of the present disclosure, a method isexecutable on one or more processors for implementing a bidirectionallink between a design system and a multiphysics modeling system. Themethod includes the acts of detecting the design system, andcommunicating instructions between the detected design system and themultiphysics modeling system. The instructions include commanding thedesign system to generate a geometric representation based on parametersreceived from the multiphysics modeling system.

According to another aspect of the present disclosure, a system isconfigured to establish a bidirectional link between a design system anda multiphysics modeling system. The system includes one or more memorycomponents configured to store a design system dynamic link library anda multiphysics modeling system dynamic link library. A controller isoperative to detect an installation of the design system, and implementvia the dynamic link libraries, bidirectional communications ofinstructions between the design system and the multiphysics modelingsystem.

According to yet another aspect of the present disclosure, one or morenon-transitory computer readable media are encoded with instructions,which when executed by at least one processor associated with a designsystem or a multiphysics modeling system, causes the at least oneprocessor to perform the above method(s).

Additional aspects of the present disclosure will be apparent to thoseof ordinary skill in the art in view of the detailed description ofvarious embodiments, which is made with reference to the drawings, abrief description of which is provided below.

BRIEF DESCRIPTION OF THE DRAWINGS

Features and advantages of the present disclosure will become moreapparent from the following detailed description of exemplaryembodiments thereof taken in conjunction with the accompanying drawingsin which:

FIG. 1 illustrates an exemplary aspect of a computer system;

FIG. 2 illustrates an exemplary aspect of software that may reside andbe executed in one of the hosts of FIG. 1;

FIG. 3 illustrates an exemplary aspect of a graphical user interface forselecting exemplary application modes;

FIG. 4 illustrates an exemplary aspect of a graphical user interface forselecting physical properties on subdomains for an exemplary heattransfer application mode;

FIG. 5 illustrates an exemplary aspect of a graphical user interface forspecifying physical properties on boundaries for an exemplary heattransfer application mode;

FIG. 6 illustrates an exemplary aspect of a graphical user interface formodifying partial differential equations in “coefficient view”;

FIG. 6A is an example of an exemplary aspect of a data structure thatmay be used in connection with data for each application mode selectedand also in connection with storing data for the combined partialdifferential equation system of application modes;

FIG. 7 illustrates an exemplary aspect of a graphical user interface forspecifying the ability to solve for any subset of the physicalquantities;

FIG. 8 is an example of an embodiment of a coefficient form partialdifferential equation format;

FIG. 9 is an example of a general form partial differential equationformat;

FIG. 10 is an example of formulae that may be used in an embodiment insolving for non-linear systems of equations in connection withperforming substitutions for linearization;

FIG. 11 is an example of formulae that may be used when performing aconversion from coefficient to general form;

FIGS. 12 and 13 are examples of formulae that may be used in solving forequations in coefficient and general form;

FIG. 14 is an example of formulae that may be used when approximatingthe solution with a function from a finite-dimensional function space;

FIGS. 15 and 16 are examples of formulae that may be used in connectionwith solving systems of equations in coefficient form;

FIG. 17 is an example of an embodiment of formulae that may be used inconnection with solving equations in the general form;

FIG. 18 is an example of the representation of finite elementdiscretization in accordance with conditions of formulae of FIGS. 15 and16;

FIG. 19 is an example of formulae that may be used in connection withsolving equations in the coefficient form;

FIG. 20 is an example of formulae that may be used in connection withsolving equations in the general form;

FIG. 21 is an example of an iteration formula that may be used inconnection with solving equations in general form;

FIG. 22 and FIG. 23 form a flowchart of method steps of an exemplaryaspect for specifying one or more systems of partial differentialequations, representing them in a combined form, and solving a combinedsystem of partial differential equations;

FIG. 24 is an example of a representation of a class hierarchy that maybe included in an embodiment in connection with predefined and userdefined application modes;

FIG. 25 is an example of one dimensional predefined application modesthat may be included in an embodiment;

FIG. 26 is an example of two dimensional predefined application modesthat may be included in an embodiment;

FIG. 27 is an example of properties of an application mode;

FIG. 28 is an example of a class constructor that may be used to createa user defined application or application mode;

FIG. 29 is an example of methods that may be included in an embodimentfor an object class;

FIG. 30 is an example of a GUI that may be displayed in connection witha user-defined application;

FIG. 31 is an example of formulae that may be used in connection withthe user-defined application of FIG. 30;

FIG. 32 is an example of a constructor used in creating the user-definedapplication of FIG. 30;

FIG. 33 and FIG. 34 are examples of fields that may be included in auser-defined portion of a data structure used in connection with theuser-defined application of FIG. 30; and

FIG. 35 includes examples of fields that may be included in a datastructure used to define a geometric object used in connection with theuser-defined application mode of FIG. 30;

FIG. 36 is an example of another embodiment of a user interface that maybe used in connection with specifying local and non-local couplings ofmultiphysics systems;

FIG. 37 is an example of a Boundary settings dialog box;

FIG. 38 is an example of a Subdomain Settings dialog box;

FIG. 39 is another example of a Subdomain Settings dialog box;

FIG. 40 is an example of a representation of the data structure that maybe included in an embodiment in connection with storing data inconnection with the PDEs selected and combined;

FIG. 41 is an example of a weak formulation;

FIG. 42 is an example of a conversion from general form to weak form;

FIG. 43 is an example of a Point Settings dialog box;

FIG. 44 is an example of an Edge Settings dialog box;

FIGS. 45A-C illustrate various pages of a Coupling Variable Settingsdialog box, respectively showing a Variables page, Source page andDestination page;

FIGS. 46 and 47 respectively show examples of a Variables page and aDefinition page of an Expression Variable Settings dialog box;

FIGS. 48-50 are flowcharts of processing steps in an exemplary aspectfor forming and solving a system of partial differential equations of acombined system;

FIG. 51 is a flowchart of processing steps in an embodiment for solvinga system of PDEs;

FIG. 52 is a flowchart of processing steps in an embodiment forcomputing the stiffness matrix;

FIG. 53 is a flowchart of processing steps in an embodiment forcomputing the residual matrix;

FIG. 54 is a flowchart of processing steps in an embodiment fordetermining the constraint matrix;

FIG. 55A is a flowchart of processing steps in an embodiment fordetermining a constraint residual;

FIGS. 55B-55M are flowcharts of processing steps in an embodiment fordetermining the Jacobian and values of different types of variables;

FIGS. 56-57 are examples of data structures that may be included in anembodiment in connection with the extended mesh structure for multiplegeometries;

FIGS. 58-75 are examples of embodiments of screenshots that may be usedin an embodiment of the computer system of FIG. 1; and

FIG. 76 is a screen shot of a graphical user interface for a couplingvariables settings dialog box;

FIG. 77 is a graph of an example of Poisson's equation on a singlerectangular domain;

FIGS. 78A-78B are graphs of examples of scalar couplings;

FIG. 79 is a graph of another example of Poisson's equation on a singlerectangular domain;

FIGS. 80A-80C are graphs of examples of extrusion couplings;

FIGS. 81A-81C are graphs of examples of projection couplings;

FIG. 82 is a diagram of a packed bed in a reactor;

FIG. 83 is another screen shot of a graphical user interface for thecoupling variables settings dialog box;

FIG. 84 is a screen shot of a graphical user interface for aconcentration plot;

FIG. 85 is a graph of a three-dimensional plot;

FIG. 86 is a perspective view of a magnetic brake;

FIG. 87 is a screen shot of a graphical user interface for a draw mode;

FIG. 88 is a screen shot of a graphical user interface for anexpressions variable settings;

FIG. 89 is a screen shot of a graphical user interface for anexpressions variable settings;

FIG. 90 is a screen shot of a graphical user interface for meshparameters;

FIG. 91 is a screen shot of a graphical user interface for a solution tothe entered parameters in FIG. 90;

FIGS. 92-95 are screen shots of graphical user interfaces for thecoupling variables settings;

FIG. 96 is a screen shot of a graphical user interface for cross-sectionplot parameters; and

FIGS. 97A-97B are graphs of plots for ω and dω/dτ.

FIG. 98 illustrates an exemplary aspect of a design system interface forcommunicating with and accessing model settings of an associatedmultiphysics modeling system.

FIG. 99 illustrates an exemplary aspect of communications in abidirectional link between a design system and a multiphysics modelingsystem.

FIG. 100 illustrates an exemplary graphical user interface in amultiphysics modeling system for establishing a link to a design system.

FIG. 101 illustrates exemplary dynamic link library operations for abidirectional link between a multiphysics modeling system and a designsystem.

FIG. 102 illustrates an exemplary aspect of a bridge connection forcommunications between a design system and a multiphysics modelingsystem.

FIG. 103 illustrates an exemplary aspect of a bridge connection forcommunicating between a multiphysics modeling system and a design systemuser interface.

FIG. 104 illustrates an exemplary aspect for dynamically controlling,via a bidirectional link, parametric and geometric features between adesign system and a multiphysics modeling system.

FIG. 105 illustrates another exemplary aspect for dynamicallycontrolling, via a bidirectional link, parametric and geometric featuresbetween a design system and a multiphysics modeling system.

FIG. 106 illustrates another exemplary aspect for dynamicallycontrolling, via a bidirectional link, parametric and geometric featuresand associativity operations to set physical properties and boundaryconditions in a multiphysics modeling system.

FIG. 107 illustrates an exemplary graphical user interface in amultiphysics modeling system for dynamically controlling featuresbetween the multiphysics modeling system and a design system.

FIG. 108 illustrates an exemplary process for defining variations ofparameters controlling geometric features in a design system.

FIG. 109 illustrates an exemplary graphical user interface for definingparameter variations.

FIG. 110 illustrates an exemplary process for generating a model treewithin a multiphysics modeling system.

FIG. 111 illustrates an exemplary process for forming and solving asystem of partial differential equations in a multiphysics modelingsystem based on operations represented in a model tree.

FIG. 112 illustrates an exemplary aspect of a model tree for forming andsolving multiphysics problems in a multiphysics modeling system.

FIG. 113 illustrates an exemplary aspect of a physics node of a modelnode for a model tree that includes operations for generating physicalquantities and boundary conditions for a multiphysics problem.

FIG. 114 illustrates an exemplary aspect of a window for a node of amodel tree for entering settings that define model operations for amultiphysics problem.

FIG. 115 illustrates an exemplary aspect of a physics node of a modelnode that has an additional node for describing selected physicalquantities for a multiphysics problem.

FIG. 116 illustrates an exemplary aspect of a physics node of a modelnode describing operations representing contributions to the physicalquantities of a multiphysics problem.

FIG. 117 illustrates an exemplary window for adding contributions to thephysical quantities associated with a physics node.

FIG. 118 illustrates an exemplary model tree having a plurality of nodesincluding the identification of exclusive operation(s) associated with aselected node.

FIG. 118 illustrates an exemplary model tree having a plurality of nodesincluding the identification of non-exclusive operation(s) associatedwith a selected node.

FIG. 120 illustrates an exemplary aspect of a model tree including aplurality of nodes for which settings of each of the model nodes can beaccessed to allow the formation and solving of a multiphysics problem ona multiphysics modeling system.

While the present disclosure is susceptible to various modifications andalternative forms, specific embodiments have been shown by way ofexample in the drawings and will be described in detail herein. Itshould be understood, however, that the invention is not intended to belimited to the particular forms disclosed. Rather, the invention is tocover all modifications, equivalents, and alternatives falling withinthe spirit and scope of the invention as defined by the appended claims.

DETAILED DESCRIPTION

While the present disclosure is susceptible of embodiment in manydifferent forms, there is shown in the drawings and will herein bedescribed in detail various aspects of the invention with theunderstanding that the present disclosure is to be considered as anexemplification of the principles of the invention and is not intendedto limit the broad aspect of the invention to the aspects illustrated.

Computer systems may be used for performing a variety of different tasksby executing one or more computer programs stored on computer readablemedia (e.g., temporary or fixed memory, magnetic storage, opticalstorage, electronic storage, other non-transitory media, flash memory).A computer program may include instructions which, when executed by aprocessor, perform one or more tasks. In certain embodiments, a computersystem may execute machine instructions, as may be generated, forexample, in connection with translation of source code to machineexecutable code, to perform modeling, simulation, and problem solvingtasks. One technique which may be used to model systems is to representvarious physical aspects of the system being modeled in terms ofequations or in other quantifiable ways that may be processed by acomputer system. In turn, these equations or other quantifiable ways maybe solved by a computer system configured to solve for one or morevariables associated with the equation, or the computer may beconfigured to solve a problem using other received input parameters.

It is contemplated that computer applications for modeling a system mayprovide many advantages particularly as the complexity of the model andthe system being modeled increases. In certain embodiments a user may beable to combine one or more systems that are each represented bydifferent models, into a multiphysics modeling system. Multiphysicsmodeling systems typically involve multiple physical models or multiplesimultaneous physical phenomena. For example, combining chemicalkinetics and fluid mechanics or combining finite elements with moleculardynamics. Multiphysics modeling can also include solving coupled systemsof partial differential equations. Exemplary multiphysics modelingsystems include the COMSOL® 4.0 or COMSOL Multiphysics® simulationsoftware operating on a computer system, as such software is availablefrom COMSOL, Inc. of Burlington, Mass.

Additional exemplary aspects of multiphysics modeling systems aredescribed in U.S. patent application Ser. No. 10/042,936, filed on Jan.9, 2002, now issued as U.S. Pat. No. 7,596,474, U.S. patent applicationSer. No. 09/995,222, filed on Nov. 27, 2001, now issued as U.S. Pat. No.7,519,518, and U.S. patent application Ser. No. 09/675,778, filed onSep. 29, 2000, now issued as U.S. Pat. No. 7,623,991, the disclosures ofwhich are each hereby incorporated by reference herein in theirentirety.

An automatic technique for combining the one or more systems may bedesirable such that the combination of the systems together may bemodeled and accordingly represented in terms of combined physicalquantities and equations. It may also be desirable for the automatictechnique to provide for selectively solving for one or more variablesassociated with the combined system and/or for solving the variablesassociated with one or more of the individual systems.

It may be desirable in certain embodiments to model the physicalquantities of a particular system using different sets of equations torepresent the model. This can allow for different techniques to beutilized to solve the system of equations associated with a singular orcombined system. For example, different forms of equations may bedetermined to be more desirable, such as linear or non-linear equations,because they provide expedient and efficient solutions. It iscontemplated that in certain embodiments, systems of partialdifferential equations having multiple geometries can be desirable.Partial differential equations can provide an efficient and flexiblearrangement for defining various couplings between the partialdifferential equations within a single geometry, as well as, betweendifferent geometries.

It is contemplated that computer system(s) on which modeling systemsoperate, such as the ones described herein, can include networkedcomputers or processors. In certain embodiments, processors may beoperating directly on the modeling system user's computer and in otherembodiments, a processor may be operating remotely. For example, a usermay provide various input parameters at one computer or terminal locatedat a certain location. Those parameters may be processed locally on theone computer or they may be transferred over a local area network or awide area network, to another processor, located elsewhere (e.g.,another room, another building, another city) that is configured toprocess the input parameters. The second processor may be associatedwith a server connected to the Internet (or other network) or the secondprocessor can be several processors connected to the Internet (or othernetwork), each handling select function(s) for developing and solving aproblem on the modeling system. Any of the processes or steps associatedwith the modeling system that are described herein can be performed byany one of the processors. It is further contemplated that the resultsof the processing by the one or more processors can then be assembled atyet another server or processor. It is also contemplated that theresults may be assembled back at the terminal or computer where the useris situated. The terminal or computer where the user is situated canthen display the solution of the modeling system to the user via adisplay (e.g., a transient display) or in hard copy form (e.g., via aprinter). Alternatively, the solution may be stored in a memoryassociated with the terminal or computer, or the solution may be storedon another server that the user may access to obtain the solution fromthe modeling system.

It is contemplated that in certain embodiments a product or system maybe in the development or feasibility stage where it is being designed oranalyzed. Such a product or system may be the subject of a multiphysicsmodeling system which can be used to assess the product or system incomplex environment(s) involving several physical quantities orparameters. It may also be desirable to solve complex multiphysicsproblems associated with various products or systems by systematicallyvarying parametric and geometric features in a computer-based designsystem. Other desirable features may include, for example, to have acomputer-based system for solving complex multiphysics problems in whichthe settings for the physical properties and boundary conditions locatedin a memory and used to form multiphysics models and/or solvemultiphysics problems can be accessed directly from the design system,such as through an interface between the design system and themultiphysics modeling system or an interface within one of the designsystem or the multiphysics modeling system. It is contemplated that theinterface may be virtual or reside in a permanent memory. It is alsocontemplated the interface may at least partially include physicalhardware components that may or may not also include software componentsfor allowing useful interactions between the design system and themultiphysics modeling system. It is further contemplated that it may bedesirable to have a modeling system having logical relationshipsestablished between various model components using a model tree thatincludes a plurality of nodes with branch relationships between thenodes.

Referring now to FIG. 1, an exemplary aspect of a computer system isillustrated. The computer system 10 includes a data storage system 12connected to host systems 14 a-14 n through communication medium 18. Inthis embodiment of the computer system 10, the N hosts 14 a-14 n mayaccess the data storage system 12, for example, in performinginput/output (PO) operations. The communication medium 18 may be any oneof a variety of networks or other type of communication connections asknown to those skilled in the art. For example, the communication medium18 may be the Internet, an intranet, or other network connection bywhich the host systems 14 a-14 n may access and communicate with thedata storage system 12, and may also communicate with others included inthe computer system 10.

Each of the host systems 14 a-14 n and the data storage system 12included in the computer system 10 may be connected to the communicationmedium 18 by any one of a variety of connections as may be provided andsupported in accordance with the type of communication medium 18. Theprocessors included in the host computer systems 14 a-14 n and the datamanager system 16 may be any one of a variety of commercially availablesingle or multi-processor system, such as an Intel-based processor, IBMmainframe or other type of commercially available processor able tosupport incoming traffic in accordance with each particular embodimentand application.

It should be noted that the particulars of the hardware and softwareincluded in each of the host systems 14 a-14 n, as well as thosecomponents that may be included in the data storage system 12 aredescribed herein in more detail, and may vary with each particularembodiment. Each of the host computers 14 a-14 n, as well as the datastorage system 12, may all be located at the same physical site, or,alternatively, may also be located in different physical locations.Examples of the communication medium that may be used to provide thedifferent types of connections between the host computer systems, thedata manager system, and the data storage system of the computer system10 may use a variety of different communication protocols such as SCSI,ESCON, or Fiber Channel. Some or all of the connections by which thehosts, data manager system 16 and data storage system 12 may beconnected to the communication medium 18 may pass through othercommunication devices, such as a Connectrix or other switching equipmentthat may exist such as a phone line, a repeater, a multiplexer or even asatellite.

Each of the host computer systems may perform different types of dataoperations, such as storing and retrieving data files used in connectionwith an application executing on one or more of the host computersystems. For example, a computer program may be executing on the hostcomputer 14 a and store and retrieve data from the data storage system12. The data storage system 12 may include any number of a variety ofdifferent data storage devices, such as disks, tapes, and the like inaccordance with each implementation. As will be described in followingparagraphs, software may reside and be executing on any one of the hostcomputer systems 14 a-14 n. Data may be stored locally on the hostsystem executing software, as well as remotely in the data storagesystem 12 or on another host computer system. Similarly, depending onthe configuration of each computer system 10, software as describedherein may be stored and executed on one of the host computer systemsand accessed remotely by a user on another computer system using localdata. A variety of different system configurations and variations arepossible then as will be described in connection with the embodiment ofthe computer system 10 of FIG. 1 and should not be construed as alimitation of the techniques described elsewhere herein.

Referring now to FIG. 2, an exemplary aspect of the software 19 isillustrated that may reside in one of the host computer systems such aswhose computer system 14 a-14 n. The software of computer system 14 a ofFIG. 2 may include a User Interface module 20 that communicates with theModeling and Simulation module 22. The software further includes a DataStorage and Retrieval module 24 which communicates with the Modeling andSimulation module 22 for performing tasks in connection with datastorage and retrieval. The Data Storage and Retrieval module 24 mayretrieve data files, for example, that may be stored in Libraries 26 aswell as perform data operations in connection with User Data Files 28.

It should be noted that certain embodiments may include other softwarecomponents other than what is described and functionally represented inthe software modules 19 of FIG. 2. In the embodiment shown in FIG. 2,both the Libraries and the User Data Files are shown as being storedlocally within the host computer system. It should also be noted thatthe Libraries and/or User Data Files, as well as copies of these, may bestored in another host computer system as well as in the Data StorageSystem 12 of the computer system 10. However, for simplicity andexplanation in paragraphs that follow, it is assumed that the softwaremay reside on a single host computer system, such as 14 a, withadditional backups, for example, of the User Data Files and Libraries,in the Data Storage System 12.

In certain embodiments, portions of the software 19, such as the userinterface 20, the Modeling and Simulation module 22, Data Storage andRetrieval module, and Libraries 26 may be included in combination in acommercially available software package. These components may operate onone of the host systems 14 a-14 n running Matlab V5.0, as well as one ofWindows 95 or 98, Windows NT, Windows XP, Windows Vista, Windows 7, MacOS X, Unix, or Linux operating systems. One embodiment of the software19 may be implemented using MATLAB5.3 running on one of Windows 95,Windows NT, Unix or Linux operating systems.

The User Interface module 20 as will be described in more paragraphsthat follow, may display user interface screens in connection withobtaining data used in performing modeling, simulation, and/or otherproblem solving for one or more systems under consideration. These oneor more systems may be modeled and/or simulated by the Modeling andSimulation module 22. Data gathered such as in connection with the UserInterface 20 and used by the Modeling and Simulation module 22 may beforwarded to the Data Storage and Retrieval module 24 where user-entereddata, for example, may be stored in User Data Files 28. Additionally,other data and information may be obtained from the Libraries 26 asneeded by the Modeling and Simulation module or in connection with theUser Interface 20. In this particular example, the software in themodules may be written in any one of a variety of computer programminglanguages such as C, C++, Java or any combination of these or othercommercially available programming languages. For example, oneembodiment includes software written in MATLAB 5.3 and C. C routines maybe invoked using the external function interface of MATLAB.

Additionally, various data files such as User Data Files 28 and theLibraries 26 may be stored in any one of a variety of data file formatsin connection with a file system that may be used in the host computersystem, for example, or in the Data Storage System 12. An embodiment mayuse any one of a variety of database packages in connection with thestorage and retrieval of data. The User Data files 28 may also be usedin connection with other software simulation and modeling packages. Forexample, the User Data files 28 may be stored in a format that may alsobe used directly or indirectly as an input to any one of a variety ofother modeling packages, such as Matlab. In particular, an embodimentmay provide for importing and exporting data between this system andanother system, such as Matlab, for example. The precise format of thedata may vary in accordance with each particular embodiment as well asthe additional functionalities included therein.

As described in more detail elsewhere herein and in U.S. patentapplication Ser. No. 10/042,936, filed on Jan. 9, 2002, now issued asU.S. Pat. No. 7,596,474, U.S. patent application Ser. No. 09/995,222,filed on Nov. 27, 2001, now issued as U.S. Pat. No. 7,519,518, and U.S.patent application Ser. No. 09/675,778, filed on Sep. 29, 2000, nowissued as U.S. Pat. No. 7,623,991, the disclosures of which are eachhereby incorporated by reference herein in their entirety, varioustechniques may be used for combining application modes modelingdifferent systems. Properties of these application modes represented bypartial differential equations (PDEs) may be automatically combined toform PDEs describing these quantities in a combined system orrepresentation. The combined PDEs when displayed, for example, in a“coefficient view” may be modified and further used as input to a finiteelement solver. It should be noted that the differential equations maybe provided to the finite element solver either independently,describing a single system, or as a combined system of PDEs.

The software 19 provides the ability to combine application modes thatmodel physical properties through one or more graphical user interfaces(GUIs) in which the user selects one or more application modes from alist. When a plurality of application modes are combined, this may bereferred to as a multiphysics model. In addition to the application modenames, the variable names for the physical quantities may be selectedthrough a GUI. Application modes may have different meanings dependingon a “submode” setting. This is described in more detail elsewhereherein.

The physical properties that are used to model the physical quantitiesin a system under examination in connection with the software 19 may bedefined using a GUI in which the physical properties may be described asnumerical values. These physical properties may also be defined asmathematical expressions including one or more numerical values, spacecoordinates, time coordinates and the actual physical quantities. Thephysical properties may apply to some parts of a geometrical domain, andthe physical quantity itself can also be disabled in the other parts ofthe geometrical domain. A geometrical domain or “domain” may bepartitioned into disjoint subdomains. The mathematical union of thesesubdomains forms the geometrical domain or “domain”. The completeboundary of a domain may also be divided into sections referred to as“boundaries”. Adjacent subdomains may have common boundaries referred toas “borders”. The complete boundary is the mathematical union of all theboundaries including, for example, subdomain borders. For example, incertain embodiments, the geometrical domain may be one-dimensional,two-dimensional or three dimensional in the GUI. However, as describedin more detail elsewhere herein, the PDE solution solvers may be able tohandle any space dimension. Through the use of GUIs in oneimplementation, the physical properties on the boundary of the domainmay be specified and used to derive the boundary conditions of the PDEs.

Additional function included in the software 19, such as in the Modelingand Simulation module, may provide for automatically deriving thecombined PDE's and boundary conditions of the multiphysics modelingsystem. This technique merges the PDEs of the plurality of systems, andmay perform symbolic differentiation of the PDEs, and produce a singlesystem of combined PDEs.

The combined PDEs may be modified before producing a solution. Incertain embodiments, this may be performed using a dialog box includedin a GUI displaying the combined PDEs in a “coefficient view”. When thederived PDEs are modified in this way, the edit fields for thecorresponding physical properties become “locked”. The properties maysubsequently be unlocked in certain embodiments by an explicit useraction.

It should be noted that certain embodiments may include functionalityfor modeling any one or more of many engineering and scientificdisciplines. These may include, for example, acoustics, chemicalreactions, diffusion, electromagnetics, fluid dynamics, general physics,geophysics, heat transfer, porous media flow, quantum mechanics,semiconductor devices, structural mechanics, wave propagation, and thelike. Some models may involve more than one of the foregoing systems andrather may require representing or modeling a combination of theforegoing. The techniques that are described herein may be used inconnection with one or more systems of PDEs. In certain embodimentsdescribed herein, these PDEs may be represented in general and/orcoefficient form. The coefficient form may be more suitable inconnection with linear or almost linear problems, while the general formmay be better suited for use in connection with non-linear problems. Thesystem(s) being modeled may have an associated submode, for example,such as stationary or time dependent, linear or non-linear, scalar ormulti-component. Certain embodiments may also include the option ofperforming, for example, eigenvalue or eigenfrequency analysis. In theembodiment described herein, a Finite Element Method (FEM) may be usedto solve for the PDEs together with, for example, adaptive meshing and achoice of a one or more different numerical solvers.

In certain embodiments, a finite element mesh may include simplicesforming a representation of the geometrical domain. Each simplex belongsto a unique subdomain, and the union of the simplices forms anapproximation of the geometrical domain. The boundary of the domain mayalso be represented by simplices of the dimensions 0, 1, and 2, forgeometrical dimensions 1, 2, and 3, respectively. The finite elementmesh may be formed by using a Delanunay technique, for example, asdescribed in “Delanunay Triangulation and Meshing”, by P.-L. George, andH. Bourouchaki, Hermes, Paris, 1998. Generally, this technique may beused to divide the geometrical domain into small partitions. Forexample, for a 1-dimensional domain, the partitions may be intervalsalong the x-axis. For a 2-dimensional square domain, the domain may bepartitioned into triangles or quadrilaterals. For a 3-dimensionaldomain, the domain may be partitioned into tetrahedrons, blocks or othershapes.

It should be noted that a mesh representing a geometry may also becreated by an outside or external application and may subsequently beimported for use into the system(s) and embodiment(s) described in thepresent disclosure.

The initial value of the solution process may be given as numericalvalues, or expressions that may include numerical values, spacecoordinates, time coordinates and the actual physical quantities. Theinitial value(s) may also include physical quantities previouslydetermined.

The solution of the PDEs may be determined for any subset of thephysical properties and their related quantities. Further, any subsetnot solved for may be treated as initial values to the system of PDEs.

Referring now to FIG. 3, an exemplary aspect of a user interface or GUI30 is illustrated that may be used in connection with specifying amultiphysics modeling system of more than one system to be combined. Inthis example, each system to be combined may correspond to anapplication mode. Through the use of the GUI 30, the application modesthat are to be used in this combined multiphysics modeling system may bespecified. Each application mode models physical quantities in terms ofPDEs. The physical quantities may be represented either directly as thedependent variables in the PDE, or by a relation between the dependentvariable and the variable representing the physical quantity. The PDEsin this embodiment may be generally “hidden” from the user through theuse of the GUIs. When several application modes are combined into onesingle model or system, it may be referred to as a multiphysics model.

The list of application modes 32 is the list of possible applicationmodes from which a user may select in accordance with the user choice ofspace dimension indicated the buttons 56 in the left-hand top of the GUI30. To add application modes to a multiphysics model, the user selectsapplication modes from the left-most list box 32 and may specify thatthese application modes are to be included in a multiphysics model, forexample, selecting the button 33 a. After selection, this applicationmode is added to the list 58 on the right hand side of the GUI 30.Application modes may also be removed from the list by selecting button33 b. Before adding an application mode, the user may edit its name 36and names of the variables 38 representing the physical quantities thatmay be solved for, for example, resulting in the new name 44 and newname of the variable 46.

Each application mode in the multiphysics model is given a unique namethat may be used to identify the origin of the variables in themultiphysics model. The example shown in the GUI 30 is for anapplication mode “Heat Transfer” in the list 32. When selected usingbutton 33 a, the application mode appears on list 58. The user may editthe application mode name, for example, changing it from that includedin display 36 to the corresponding name of display item 44. Similarly,the dependent variable name may be modified from that shown in item 38to the item 46. In this example, only one variable is associated withthe Heat Transfer application mode. For an application mode includingmore than one physical quantity, the user may enter all the names of thephysical quantities as space-separated entries in the Dependentvariables edit field 46.

There are also application modes that directly correspond to PDEs. Inthese modes, the quantities are represented by the dependent variables.Each of these application modes may have more than one dependentvariable. The number of dependent variables and the dimension of systemof PDEs may be determined by entering one or more correspondingspace-separated variable names.

On the right-hand side of the multiphysics GUI 30, a solver type andsolution form may be selected. The solver type may be specified in theitem 40, for example, as one of stationary, time-dependent, and thelike. Similarly, the solution form may be specified in item 42, forexample as “coefficient” or “general” form. These refer to the form ofthe PDE for which the solution is derived and are described in moredetail elsewhere herein. The solver types and solution forms may vary inaccordance with the application modes of the multiphysics model. In thelist box 58, all the application modes that have been added to the modelappear. A user may select any of the model's application modes andchange its submode 48. Generally, a submode may relate to the manner inwhich equations are derived or differentiated, for example, with respectto what variables differentiation may be performed.

In this example, the standard submode is specified at element 48.Additionally, an application mode may include other associated submodes,for example, such as, a wave-extension submode that extends a standardtime-dependent equation to a wave equation using the second derivativeof the standard equation with respect to time. Selecting OK using button31 a saves the updated multiphysics model with all the added applicationmodes and closes the GUI 30. In contrast, selecting Cancel using button31 b closes the GUI and discards any changes. Referring to FIG. 2, whenthe OK button 31 a is selected, the data may be communicated from theGUI 20 to the Modeling and Simulation Module 22 and subsequently to theData Storage and Retrieval Module 24 for storage in the User Data Files28.

The foregoing screen display, such as GUI 30, may be displayed by andincluded as a portion of the software of the User Interface Module 20 ofthe software 19. It should be noted that certain embodiments may includedifferent types of application modes. In one embodiment, applicationmodes may be classified as one of user defined or predefined. Apredefined application mode may be one for which functionality isincluded in the libraries 26 as may be available from a software vendor.In other words, a software vendor may supply libraries including definedsystems of PDEs, GUIs and the like for a particular type of system, suchas heat transfer. Additionally, an embodiment may include support toprovide for user-defined models or application modes for which a usermay specify the PDEs, the quantities being modeled, and the like.Subsequently, a user-defined model may be saved in a user definedlibrary, for example, included in the user defined data files 28.Definitions and other data files associated with a user-defined modelmay be stored in any one of a variety of data formats, for example,similar to those of the libraries 26 that may be included in animplementation by a software vendor. The format and function may vary inaccordance with each embodiment.

In certain embodiments, a user may define and add a user-definedapplication mode by adding functions in MATLAB format for transformingthe physical properties on subdomains, boundaries, and initialconditions. The user may specify a first function, equ_compute, fortransforming physical quantities to PDE coefficients, a second function,bnd_compute, for transforming the physical properties on the boundariesto boundary conditions, and a third function, init_compute, fortransforming the physical properties in the initial condition. Moredetail on user defined application modes is described elsewhere herein.

Referring now to FIG. 4, an exemplary aspect of an screen display of thephysical property specification GUI 60 is illustrated for the heattransfer application mode. It is contemplated that each application modemay have a specifically designed GUI display in which the physicalproperties associated with that application mode may be specified. Thelist 62 in the left of the GUI 60 includes one or more geometricaldomains to which the physical properties may apply. These may also bereferred to as subdomains. The user may select one or several subdomainsfrom the list 62, for example, using a mouse, keyboard or otherselection device. If a single subdomain is selected, entering a new namein the edit field Name 62 a may change the name. If the user selectsmultiple subdomains, the properties that are specified apply to all theselected subdomains. The “on-top” check box 64 a makes the boundarycondition GUI “float” on top of the view of the geometrical domain also.In other words, the corresponding dialog box “floats” on top of otheritems that may be displayed on the screen in connection with the GUI.

In certain embodiments, if the properties of the currently selectedsubdomains differ, the edit fields for the properties may be “locked”for no editing. One may unlock the subdomains by explicitly checking theUnlock check box 64 a. The properties from the first selected subdomainmay be copied to all the selected subdomains.

It should be noted that in certain embodiments, selecting severalsubdomains with different physical properties may also cause locking.Checking “unlocking” may then result in the properties in the firstselected subdomain being copied to the other subdomains.

The physical properties of the subdomains are specified in the list 64.As previously described, these properties may be specified as numericalvalues, or also as symbolic expressions in terms of the spacecoordinates, the physical quantities and their space derivatives, andthe time. Additionally, a name of a procedure to compute a value of theproperty may also be specified by entering the name and any parametersthat may be included in the procedure. In certain embodiments, theprocedure may be written, for example, in C, Fortran, or Matlab. Theparticular language of implementation may vary in accordance with eachparticular embodiment and the calling standards and conventions includedtherein.

A user may also disable the physical quantities of an application modein a subdomain entirely by un-checking the “Active in this Subdomain”checkbox 66. This removes the properties in 64 from the application inthe selected subdomain(s). Also the physical quantities in thisapplication mode are disabled in the selected subdomain(s).

Referring now to FIG. 5, an exemplary aspect of a screen display of aGUI 70 is illustrated, which is a physical property boundaryspecification GUI for the heat transfer application mode. The list 72 inthe left portion of the GUI 70 includes geometrical boundaries where thephysical properties may apply. Only the boundaries that form the outerboundary with respect to the active subdomains are included in the list.As described elsewhere herein, those subdomains that are “active” may bespecified in the GUI 60 for physical properties.

Boundaries that are entirely inside the subdomain or between twosubdomains are also not shown unless the “Enable borders” check box 72 ais selected. A user may select one or several boundaries from the list72. If the user selects a single boundary, the user can change its nameby entering a new name in the Name edit field 72 b. If the user selectsmultiple boundaries, the properties that the user specifies, as in list74, apply to all the selected boundaries. If the properties on thecurrently selected boundaries differ, the edit field 72 b for theproperties is locked. One may unlock the subdomains by explicitlychecking the “Unlock” check box 74 a. The properties from the firstselected boundary are then copied to all the selected boundaries.

In certain embodiments, selecting several boundaries with differentphysical properties may also cause locking. Checking “unlock” may thenresult in the properties in the first selected boundary being copied tothe other boundaries.

The physical properties of the geometrical boundaries are specified inthe list 74 in the right hand portion of the GUI 70. These propertieshave values that may be specified as numerical values, or symbolicexpressions in terms of the space coordinates, the physical quantitiesand their space derivatives from any application modes added by usingthe previous section, and the time. Additionally, the name of aprocedure to determine the value of the property may also be specifiedin a manner similar to as described elsewhere herein.

It should be noted that a portion of the different GUIs displayed may besimilar, for example, such as the “on top” check box 74 b that issimilar in function to 64 a as described elsewhere herein.

Referring now to FIG. 6, an exemplary aspect of a screen display isillustrated that may be used in connection with modifying the PDEs in a“coefficient view”. Using this interface 80 of FIG. 6, this may be usedin connection with modifying the boundary conditions in coefficient viewas associated with the combined system of PDEs. It should be noted thatother embodiments may also include a similar screen display andinterface to allow for modification of PDEs of each individualapplication mode or system being modeled. Additionally, an embodimentmay also include a similar screen display for modifying a system ingeneral form rather than coefficient form as shown in the display 80 ofFIG. 6.

The GUI 80 may be displayed in connection with modifying the boundaryconditions associated with a coefficient. For example, in the GUI 80,the boundaries 1 and 3 have been selected as associated with thecoefficient tab “q” 82 a corresponding to the coefficient appearing inthe PDE at position 84 a. The list 90 on the right hand side of the GUI80 includes the boundary conditions associated with the active “q”coefficient. A user may modify the conditions associated with thecurrently active coefficient, such as “q”. Any one of the tabbedcoefficients, such as 82 a-82 d may be made active, for example, byselecting the tab, such as with a mouse or other selection device. Thiscauses the right hand portion 90 of the GUI 80 to be updated withcorresponding values for the currently active coefficient. The valuesmay be modified by editing the fields of 90 and selecting the OK button92 a, or the apply button 92 c. The modification may be cancelled, as byselecting the cancel operation button 92 b. A boundary number that isselected on list 88 may be changed to have a symbolic name, as may bespecified in field 96. The values indicated in 90 are set accordinglyfor the selected boundaries 88. The on-top check box 94, and otherfeatures of GUI 80, are similar to those appearing in other GUIs anddescribed in more detail elsewhere herein.

It should be noted that the PDE coefficient and boundary conditionsassociated with the combined system of PDEs for the various applicationmodes selected may be stored in a data structure that is described inmore detail elsewhere herein. Subsequently, if these coefficient andboundary conditions are modified, for example, using the GUI 80 of FIG.6, the corresponding data structure field(s) may be updated accordingly.As described elsewhere herein and in U.S. patent application Ser. No.10/042,936, filed on Jan. 9, 2002, now issued as U.S. Pat. No.7,596,474, U.S. patent application Ser. No. 09/995,222, filed on Nov.27, 2001, now issued as U.S. Pat. No. 7,519,518, and U.S. patentapplication Ser. No. 09/675,778, filed on Sep. 29, 2000, now issued asU.S. Pat. No. 7,623,991, the combined system of PDEs and associatedboundary condition fields may be updated.

It should also be noted that the dialog for modifying the boundaryconditions in coefficient view of a system of three variables may beviewed in the example GUI 80 of FIG. 6. If the system to be solved is ingeneral form, the coefficient view dialog box may also include symbolicderivatives of the general form coefficients with respect to thephysical quantities or solution components and their derivativesaccording to FIG. 10. As described in more detail elsewhere herein, thederivatives may be used for the solution of nonlinear stationary andtime-dependent problems.

In certain embodiments, when the coefficients in coefficient view arechanged for a subdomain or a boundary, the “Unlock check-box” in thecorresponding application modes for that subdomain or boundary dialogbox is enabled, as previously described in connection with GUI 70 ofFIG. 5. In certain embodiments, in order to disable the change incoefficient view, a user may remove the checkmark as may be displayed inthe Unlock check box on the subdomain or boundary in the applicationmode, for example, as described in connection, respectively, with GUIs60 and 70.

Using the GUIs 60 and 70 for, respectively, physical properties forsubdomains and boundaries, as well as possible modifications specifiedas with GUI 80, the Modeling and Simulation Module 22 may create,initialize, and possibly modify the data structure 250 of FIG. 6A.

Referring now to FIG. 6A, shown is an example of a representation of thedata structure that may be included in an embodiment in connection withstoring data in connection with the PDEs selected and combined. The datain the data structure 250 may include data used in connection with themultiphysics model.

The data structure 250 includes the following fields:

Data field Description fem.mesh Finite element mesh fem.appl{i}Application mode I fem.appl{i}.dim Dependent variable namefem.appl{i}.equ Domain physical data fem.appl{i}.bnd Boundary physicaldata fem.appl{i}.submode Text string containing submode settingfem.appl{i}.border Border on or off fem.appl{i}.usage Matrix ofsubdomain usage fem.dim Multiphysics dependent variable names fem.equPDE coefficients fem.bnd Boundary conditions fem.border Vector of borderon or off fem.usage Multiphysics subdomain usage matrix fem.init Initialvalue fem.sol Finite element solution

The field fem.mesh 252 includes the finite element discretization. Themesh partitions the geometrical domain into subdomains and boundaries.Data stored in this field may be created from an analyzed geometry. Amesh structure representing a geometry may also be created by an outsideor external application and may subsequently be imported to use in thissystem in this embodiment. To obtain good numerical results in thesolution to a particular multiphysics problem, the mesh may have certainspecific characteristics available in connection with an externallyprovided mesh, such as by a MATLAB routine. In instances such as these,a mesh may be imported from a compatible external source. Support mayvary with embodiment as to what external interfaces are supported andwhat external formats of meshes may be compatible for use with aparticular implementation. For example, a mesh structure may becompatible for use with an embodiment such as a mesh structure producedby the product TetMesh by Simulog, and HyperMesh by Altair Engineering.

In one embodiment, a geometry is used in generating a mesh structure. Inother words, in an embodiment that includes functionality to define andcreate a mesh as an alternative to obtaining a mesh, for example, froman external compatible software product, a geometry definition may beused in generating a mesh structure. What will now be described is afunction that may be included in an embodiment. An embodiment mayinclude any one or more of a variety of alternatives to represent ageometry of a PDE problem to be solved. One technique includes defininga geometry in accordance with a predefined file format, predefinedformatted object, and the like. It should be noted that an embodimentmay include the option of importing a predefined file format orspecifying a function for describing the geometry.

It should be noted that the predefined file format may includedifferences in accordance with the varying dimensions that may besupported by an embodiment.

An embodiment may include a function or routine definition for returninginformation about a geometry represented in accordance with a predefinedfile format. This routine may be included in an implementation, or, mayalso be defined by a user. In other words, an implementation may includesupport allowing a user to provide an interface function in accordancewith a predefined template or API, such as particular input and outputparameters and function return values. Such a routine may be used as aninterface function, for example, to obtain geometry information in whicha geometry may be represented in any one of a variety of predefined fileformats, data structure formats, and the like.

The fem.mesh structure may represent a finite element mesh that ispartitioning a geometrical domain into simplices. In one embodiment,minimal regions may be divided into elements and boundaries may also bebroken up into boundary elements. In one embodiment of the meshstructure, the mesh may be represented by fields of data, two of whichare optional. The five fields are: the node point matrix (p), theboundary element matrix (e), the element matrix (t), the vertex matrix(v) and the equivalence matrix (equiv), in which v and equiv may beoptional. The matrix p includes the node point coordinates of the mesh.The matrix e may include information to assemble boundary conditions onδΩ, such as node points of boundary elements, parameter values onboundary elements, geometry boundary numbers, and left and rightsubdomain numbers. The matrix t includes information needed to assemblethe PDE on the domain Ω. It includes the node points of the finiteelement mesh, and the subdomain number of each element. The matrix vincludes information to recreate geometric vertices. The equiv matrixincludes information on equivalent boundary elements on equivalentboundaries. It should be noted that contents and of the data structuremay vary with dimension of the domain being represented. For example, inconnection with a 2-dimensional domain, the node point matrix p mayinclude x and y coordinates as the first and second rows of the matrix.The boundary element matrix e may include first and second rows thatinclude indices of the starting and ending point, third and fourth rowsincluding the starting and ending parameter values, a fifth rowincluding the boundary segment number, and sixth and seventh rowsincluding left and right hand side subdomain numbers. The element matrixt may include in the first three rows indices of the corner points,given in counterclockwise order, and a fourth row including a subdomainnumber. The vertex matrix v may have a first row including indices intop for vertices. For isolated vertices, the second row may also includethe number of the subdomain that includes the vertex. For othervertices, the second row may be padded. The field v may not be usedduring assembly, but rather have another use when the mesh structure,for example, may be used in connection with other operations or datarepresentations. The equivalence matrix equiv may include first andsecond rows of indices into the columns in e for equivalent boundaryelements. The third and fourth row may include a 1 and 2, or a 2 and 1depending on the permutation of the boundaries relative to each other.

As another example of the mesh structure, consider one that may be usedin connection with a 1-dimensional structure being represented. The nodematrix p may include x coordinates of the node points in the mesh in thefirst row. In the boundary element matrix e, the first row may includeindicates of the boundary point, the second row may include the boundarysegment number, and the third and fourth rows may include left and righthand side subdomain numbers. In the element matrix e, the first two rowsinclude indices to the corner points, given from left to right, and thethird row includes the subdomain number. In a 1-dimensional domain,there is no vertex matrix since vertices are exactly equivalent to theboundaries. In the equivalence matrix equiv, the first and second rowsinclude indices into the columns in e for equivalent boundaries. Thethird row is padded with ones.

In one embodiment, the fem structure may additionally include afem.equiv field indicating boundaries that should be equivalent withrespect to elements and node points, e.g., for periodic boundaryconditions. One implementation of fem.equiv includes a first row withmaster boundary indices and a second row with slave boundary indices.The mesh has the same number of node points for the boundaries listed inthe same column. The points are placed at equal arc-length from thestarting point of the equivalent boundaries. If a negative number isused in row two, the slave boundary may be generated by following themaster boundary from end point to start point. A master boundary may notbe a slave boundary in another column.

Following is a summary of the Delaunay triangulation method inconnection with forming a 2-dimensional mesh structure:

1. Enclose geometry in a bounding box

2. Put node points on the boundaries following HMAX

3. Perform Delaunay triangulation of the node points on the boundariesand the vertices of the box. Use the properties MINIT/ON and BOX/ON tosee the output of this step.

4. Insert node points into center of circumscribed circles of largeelements and update Delaunay triangulation until HMAX is achieved.

5. Check that the Delaunay triangulation respects the boundaries andenforce respected boundaries.

6. Remove bounding box.

7. Improve mesh quality.

-   -   in which HMAX refers to the maximum element size; BOX and MINIT        and other properties that may be used in one embodiment are        summarized below:

Property 1-D 2-D Value Default Description Box X on/off off preservebounding box Hcurve X numeric ⅓ curvature mesh size Hexr X X stringmaximum mesh size Hgrad X X numeric 1.3 element growth rate Hmax X Xnumeric estimate maximum or cell element array size Hmesh X X numericmaximum element size given per point or element on an input mesh Hnum XX numeric, number of cell elements array Hpnt X numeric, number of cellresolution array points Minit X on/off off boundary triangulation jiggleX off/mean mean call mesh min/on smoothing routine Jiggleiter X numeric10   maximum iterations out X X values mesh output variables

The foregoing properties may be used in connection with forming a meshstructure. The Box and Minit properties are related to the way the meshmethod works. By turning the box property “on”, one may obtain anestimate of how the mesh generation technique may work within thebounding box. By turning on minit, the initial triangulation of theboundaries may be viewed, for example, in connection with step 3 above.

Hcurve is a scalar numeric value relating the mesh size to the curvatureof the geometry or mesh boundaries. The radius of the curvature ismultiplied by the hcurve factor to obtain the mesh size along theboundary. Hexpr is a string including an expression of x and y givingthe size of the elements at different coordinates using the meshstructure. Hmax controls the size of the elements in the mesh. Hmax mayeither be a global value, or a cell array. The syntax of the cell arrayvaries in accordance with 1-D and 2-D. For 2-D, the first entry in thecell includes a global Hmax, the second entry is a matrix with two rowswhere the first row includes point indices and the second row includesHmax and corresponding points. The third entry includes indices to edgesegments and corresponding Hmax, and the fourth entry includes indicesto subdomains and corresponding Hmax. For a 1-D the first entry in thecell includes a global Hmax, the second entry is a matrix with two rowswhere the first row includes point indices, and the second row includesHmax in the corresponding points. The third entry includes indices tothe subdomains and corresponding Hmax.

Hmesh is a vector with one entry for every node or element in the meshgiven in the mesh structure. Hnum controls the approximate number ofelements in the mesh. Depending on other properties, the number ofelements specified by Hnum may be exceeded, but at least as manyelements specified are generated. Hnum may be either a global numericvalue or a cell array. Syntax of the cell array varies with 1-D or 2-D.For 2-D, the first entry in the cell includes a global Hnum, the secondentry is a matrix with two rows where the first row include edge indicesand the second row includes Hnum on the corresponding edges. For 1-D,the first entry in the cell includes a global Hnum, the second entry isa matrix with two rows where the first row includes subdomain indicesand the second row includes Hnum on the corresponding subdomain.

The Hpnt property controls the number of points placed on each edge toresolve the mesh. Additional points may be placed as needed inaccordance with the curvature and distances. It is either a number forall edges, or a cell. If it is a cell array, the first entry applies toall edges and the second entry is a matrix with two rows where the firstrow includes edge indices and the second row includes Hpnt on that edge.

The Jiggle property may be used to control whether “jiggling” of themesh may be attempted, for example, in using a smoothing technique. Thismay be performed until the minimum or mean of the quality of elementsdecreases by setting jiggle accordingly to min or mean. Jiggleiter maybe used to specify a maximum number of iterations.

It should be noted that the foregoing properties may be included asparameters to an API for forming a mesh structure, for example, usingthe Delaunay triangulation method. Other techniques may also be used andthe exact parameters in an embodiment using an API may also vary.Additionally, other embodiments may also include other representationsof the mesh structure that may vary in accordance with dimension of thegeometry.

Referring back to other fields of the fem structure in one embodiment,each application mode has a separate fem.appl{i} field 254, referred toas appl{i}. The index i in the appl vector runs over the set ofapplication modes that have been selected, for example, in connectionwith FIG. 3. In this embodiment, corresponding to each appl{i} for eachselected application mode are five subfields denoted 254 a-254 e. Theappl{i}.dim field 254 a includes the names of the dependent variables orphysical quantities in application mode i. The appl{i}.equ field 254 bincludes the physical properties associated with subdomain data, forexample as described in connection with FIG. 4. The field appl{i}.bnd254 c includes data describing the physical properties associated withboundary data, for example as described in connection with FIG. 5, forapplication mode i. The field border 254 d is a flag that controls ifboundary conditions on inner boundaries are to be considered, and, forexample, corresponds to the “Enable Borders check box” as described inconnection with the GUI of FIG. 5. There is one border flag for eachapplication mode. The field usage 254 e corresponds to the “Activate inthis Subdomain check box” as described in connection with the GUI ofFIG. 4. In one embodiment, this may be implemented as a boolean vector,with one column for each geometrical subdomain. A logical value of “1”or true in an entry indicates that application mode i is active in thesubdomain corresponding to that column. Fem.appl{i}.submode represents acorresponding submode setting, such as 48 of FIG. 3.

In one embodiment, the remaining fields in the data structure 250 may beassociated with the combined application modes. The field fem.dim 256includes the names of the dependent variables or physical quantities inall application modes. The fields fem.equ 258 and fem.bnd 260 correspondto the derived equations and boundary conditions for all the applicationmodes. These fields may be used in connection with data from dialogboxes for PDE and Boundary conditions in coefficient view, such as thoseGUIs described in connection with FIG. 6. Similarly the field fem.border262 may be implemented as a vector specifying borders for each variableof the variables in appl{i}.dim separately. The field fem.usage 254 eincludes data associated with the activation of dependent variables ineach geometrical subdomain. The variables in fem.dim 256 correspond tothe rows of the fem.usage field 264, and the columns correspond to thegeometrical subdomains. The field fem.init 266 includes the initialvalue for nonlinear and time dependent solvers, for example, as may beused in connection with solving for the PDEs. The field fem.sol 268 mayinclude the solution to the combined system of PDEs using a solution orPDE solving technique, for example, as may be selected in accordancewith the GUI of FIG. 7, other parameters included in the structure 250,and the type of PDE system being solved, such as whether the PDEscorrespond to a linear or non-linear system, are in coefficient orgeneral form, and the like. The field 270 indicates that other fieldsmay be included in an embodiment in accordance with each implementation.

The equ fields 254 b may include several application mode dependentsubfields with one list per physical property. Each list entriescorrespond to the subdomains of the problem. Each subfield may include alist of expression values representing the physical properties involved.For example, the heat transfer application mode includes the list: rho,C, k, Q, htrans, Text, Camb, Tambtrans, corresponding, respectively, tothe density, heat capacity, coefficient of heat conduction, heat source,convective heat transfer coefficient, external temperature, user-definedconstant, and transversal ambient temperature. This may be interpretedas a heat source of Q+htrans*(Text−T)+Camb*(Tambtranŝ4−T̂4) on asubdomain.

The usage fields 254 e and 264 describe the setting of the Active inthis subdomain setting for each physical property (or dependentvariable). The bnd fields 254 c include several application modedependent subfields with one list per physical property. The listentries correspond to the boundaries of the subdomain. Each subfieldcontains a list of expression values for the physical quantitiesinvolved, e.g., the heat transfer application mode contains the list: q,h, Tinf, C, Tamb, and T, corresponding to the heat flux and heattransfer coefficient, external temperature, user-defined constant,ambient temperature, and temperature, respectively. An additionalsubfield, type, controls the basic type of the boundary condition andwhat physical properties are used on the boundary. For example,referring to the heat transfer application mode, the type may be one ofT0, T, q, or q0. T0 indicates a zero temperature; T indicates that thetemperature is specified in the field T; and q0 indicates a zero heatflux through that boundary, and q indicates a heat flux ofq+h*(Tinf−T)+C*(Tamb̂4−T̂4) through that boundary.

The border fields 254 d and 262 indicate if the internal boundariesbetween subdomains are to be considered during the solution of themodel. In one embodiment, the outer boundaries with respect to theactive in this subdomain setting may be ignored. The equ fields 254 band 258, and the bnd fields 254 c and 260 may further include an indsubfield. Each of the ind subfields may be implemented as a vector withlength equal to the number of subdomains or boundaries. For eachsubdomain, the corresponding ind vector entry may indicate a domaingroup, or “0” for no group. For boundaries, each of the subfieldsbnd.ind may have the corresponding meaning for boundaries. When the indfield is not given, each subdomain or boundary forms a separate group.

Referring back to FIG. 6 in connection with GUI 80, fields in fem.equ258 and fem.bnd 260 may be modified if they are specified as beingapplied to the combined PDE system and subsequently modified, forexample, using the GUI 80.

Referring now to FIG. 7, an exemplary aspect of a screen display isillustrated that may be used in connection with solving the PDEs for anysubset of physical quantities from any one or more application modes, orof the combined PDE system. The GUI 110 includes a left hand portion 114displaying the one or more application modes selected with the currentcombined or multiphysics mode. The “show variables” box 114 a, ifchecked or activated, may modify the content displayed in area 114 tofurther include dependent variables in each of the associatedapplication modes. In this instance, the physical quantities may beselected as well as a particular application mode with regard to solvingfor the combined system of PDEs in which the combined system includesthose systems corresponding to the application modes in the area 114.The area 116 includes one or more various options that may be associatedwith solving for the PDEs. In this embodiment, the reference to “u” asincluded in the area 116 refers to all physical quantities for allapplication modes. Activating the field 116 b causes the updating of theappropriate data structure fields upon solving for the system of PDEs.Activating field 116 c uses interpolation in solving for the PDEs. Thisis described in more detail elsewhere herein.

The GUI 110 may be used in selecting what physical quantities to solvefor in the system of PDEs. Selecting all application modes, such as byselection an highlighting application modes of area 114, solves for allphysical quantities in the system of PDEs. Selecting a subset of theapplication modes solves for all the variables in these applicationmodes. In one embodiment, checking the checkbox 114 a “Show variables”shows the actual variable names instead of the names of the applicationmode, and enables selection of these. The “Update u” button 116 ainserts the current solution (in fem.sol) into the initial conditions(in fem.init). The check-box “update u automatically” makes uautomatically update the data structure fields fem.init with fem.soleach time a solution is computed, and the check-box “use interpolation”116 c allows interpolation to be used when the current solution and thecurrent discretization mesh are different. In one embodiment, thesolution may be interpolated to the current discretization and insertedinto fem.init. The use of interpolation, for example, is set forth in“Numerical Methods”, G. Dahlquist, Å. Björk, Prentice Hall, 1974, ISBN0-13-627315. The “Use solution number” pop-up menu 116 d controls whichsolution to update fem.init with, for example, if there are severalcolumns in fem.sol as may be for a time-dependent problem.

The values in the physical property fields of the application mode applstructure, for each of the “i” selected application modes, may beconverted into PDEs. The formats of the PDEs formed for each specifiedapplication mode may be represented as in FIGS. 8 and 9.

Referring now to FIG. 8, shown is an example of an embodiment offormulae 140 describing a system of PDEs in coefficient form. Ω, formula142, is for a bounded domain. The formulae 146, including 146 a-146 b∂Ω, correspond to the boundary of the domain 142. n_(j) corresponds tothe components of an outward unit normal.

The first equation 142 is satisfied inside the domain, and the secondand third equations of 146 are both satisfied on the boundary of thedomain. The second equation 146 a may be referred to as a generalizedNeumann boundary condition, and the third equation 146 b may be referredto as a Dirichlet boundary condition.

The unknown solutions, such as those corresponding to the physicalquantities, may be denoted by u_(k) in the formulae of 140. The unknownsolutions may include one or more components. N denotes the number ofsolution components, or physical quantities. The solution is allowed totake complex values. k_(m) is an unknown Lagrange multiplier. n_(j) is acomponent of the gradient of the solution. The coefficients included inthe formulae 140 d_(a,l,k), c_(l,k,j,i), α_(i,k,j), γ_(i,j), β_(l,k,i),α_(l,k), f_(l), q_(l,k), g_(l), h_(m,l), and r_(m) may be complex-valuedfunctions of the space, time, and the solution. The coefficients d_(a),c, α, g, β, a, and f may be functions of the gradient of u.

For a stationary system in coefficient form, for example as may bespecified in FIG. 3, item 40, d_(a)=0. With respect to solutioncomponents, the coefficients d_(a), c, α, β, a, and q are N-by-Nmatrices, and γ, f and g are N vectors. The coefficient h is an M-by-Nmatrix, and r is an M vector, where 0<=M<=N and M is the number ofconstraints. With respect to space dimension, n, (or independentvariables) the c coefficient is an n-by-n matrix, and the α, γ, and bcoefficients are n vectors. The remaining coefficients may be scalars.

Referring to the indices of the formulae 140, i and j are space indicesand k and l are component indices. Using the standard summationconvention, i.e., there is an implicit summation over each index pair, iand j, and k and l, the formulae of FIG. 8 where the indices i and j runfrom 1 to n, the indices k and l run from 1 to N, and where the index mruns from 1 to M. n_(j) is the jth component of the outward normalvector.

Referring now to FIG. 9, shown is an example of an embodiment of arepresentation of formulae 150 describing a system of PDEs in generalform. Here Ω 152 is a bounded domain, each ∂Ω, 154 a and 154 b of 154,is a boundary of the domain, and n_(j) is the outward unit normal. Theunknown solution is denoted by u_(k) and may include one or morecomponents. N denotes the number of physical quantities. The solution isallowed to take complex values. λ_(m), is an unknown Lagrangemultiplier. The generalized Neumann condition, for example as expressedby 154 a, includes a source where the Lagrange multipliers λ_(m) arecomputed such that the Dirichlet conditions become satisfied. Thecoefficients Γ_(lj), F_(l), G_(lj), and R_(m), may be complex-valuedfunctions of the space, time, the solution and its gradient. Withrespect to solution components the coefficients F, F and G are Nvectors. The coefficient R is an M vector, where 0≦M≦N, and N is thenumber of constraints. The F coefficient is an n vector with respect tospace dimension n. The rest of the coefficients are scalars with respectto space. Using j as a space index, and k and l as component indices inconjunction with implied standard summation convention, the general form150 of FIG. 9 may be expressed where the index j runs from 1 to n, theindices k and l run from 1 to N, where the index m runs from 1 to M, andn_(j) is the jth component of the outward normal vector.

The application mode physical properties, for example, as described inconnection with each selected application mode corresponding to an entryin the appl{i} structure, may be converted to the representation of PDEsin coefficient and/or general form. The combined PDEs may be representedin fields of the data structure 250, such as in the equ 258 and bnd 260fields.

As described in more detail elsewhere herein, in one embodiment, thesame syntactic rules may be used in determining coefficients for bothPDEs, as may be represented in the equ field 258, and boundaryconditions, as may be represented in the field 260. In other words, assummarized here and described further in more detail elsewhere hereinare syntactic rules that may be used in forming coefficients for thePDEs. These rules may be used in forming coefficients for each system ofPDEs associated with each application mode. These rules may also be usedin connection with forming coefficients for the combined PDE ormultiphysics system. The coefficients may be stored in nested lists.Each nested level of the lists may correspond to a nesting indexposition. For example, level 1 may corresponds to subdomain/boundary,level 2 may correspond to a solution component or physical quantity, andlevel 3 may correspond to the space coordinate. Level 4 may be a valuelevel, where the actual expressions are stored. In connection withforming coefficients for each application mode selected, input data, asmay be obtained in connection with previously described GUIs, may beconverted to PDE format. Coefficients may be formed as part of thisprocess. Data for each application mode may be stored in fields of theappl{i} data structure subfields dim, form, equ, bnd, and init.

For the combined or multiphysics, referring back to fields of the datastructure 250 described in more detail elsewhere herein, the followinglist provides the position in the data structure 250 for the combinedsystem of PDEs and boundary conditions with regard to those elementsreferenced, for example, in FIG. 8: d_(a): equ.da, c: equ.c, α: equ.al,γ: equ.ga, β: equ.be, a: equ.a, f: equ.f, q: bnd.q, g: bnd.g, h: bnd.h,r: bnd.r.

The general form coefficients, for example as described in connectionwith FIG. 9 and FIG. 11 in more detail elsewhere herein, Γ, F, G, and Rmay be stored in the equ.ga, equ.f, bnd.q, and bnd.r fields,respectively. A uniform format may be used for each of thesecoefficients. Subdomains and boundaries may be merged into groups wherethe expressions for the PDEs and boundary conditions are the same.

A subfield equ.ind of field 258 may be a vector with length equal to thenumber of subdomains. For each subdomain, the corresponding entrydesignates a subdomain group or 0 for no group. Similarly the fieldbnd.ind has the corresponding meaning for boundaries. When the ind fieldis not given, each subdomain or boundary form a separate group.

The data structure field fem.border 262 controls if assembly of boundaryconditions are performed on borders. In one embodiment, this may beimplemented as one or more boolean conditions each representing twostates:“on” and off′. Setting fem.border 262 to “off” (default) turnsoff assembly on borders, and setting fem.border to “on” turns onassembly on borders. An embodiment may implement fem.border 262 as anarray of text strings with either on or off conditions specified, or avector of logical values. The length of the array or the vector may beequal to the number of dependent variables. A border for a givendependent variable has that variable activated by fem.usage on eachside.

What will now be described are formal rules of one embodiment fordetermining coefficients at varying levels. Given a PDE or boundarycoefficient P1 with L subdomains/boundary groups and N solutioncomponents, n space coordinates, with a varying number of levels, suchas 1-4 having corresponding coefficient leveling notation P1-P4,respectively, the formal rules for coding the coefficients at varyinglevels in one embodiment may be represented as:

Level 1 (subdomain/boundary level): If P1 is a cell array then eachelement of P1 is a P2, otherwise P1 is a single P2. The number of P2s inP1 is either 1 or L.

Level 2 (solution component level): If P2 is a cell array then eachelement of P2 is a P3, otherwise P2 is a single P3. If P2 is a d_(a), c,α, β, a, or q coefficient the number of P3s in P2 is 1, N, N(N+1)/2, orN². If P2 is a γ, f, or g coefficient the number of P3s in P2 is 1 or N.If P2 is an h coefficient the number of P3s in P2 is 1 or MN, where M isan integer between 0 and N, representing the number of constraints. IfP2 is an r coefficient the number of P3s in P2 is M.

Level 3 (space-coordinate level): If P3 is a cell array then eachelement of P3 is a P4, otherwise P3 is a single P4. If P3 is a ccoefficient, then the number of P4s in P3 is 1, n, n(n+1)/2, or n². IfP3 is an a, f, q, g, h, r, or da coefficient, there is one P4. If P3 isan α, γ, or β coefficient, there are “n” P4s.

Level 4 (value level): A single item including a symbolic textexpression for computing PDE coefficient values. The expression may beevaluated where the variables xi, sd, ui, uixj, and h correspond,respectively, to representing the ith coordinate, subdomain label, ithsolution component, jth derivative of the ith solution, and the localelement size. ui and xj may refer to the variable names defined byfem.dim 256 and fem.sdim (independent variable names or space coordinatenames), respectively. It should be noted that fem.sdim may be anadditional field included in the portion 270 of data structure 250 in anembodiment.

What will now be described is one embodiment of a method for convertingapplication mode physical properties on subdomains and boundaries into aPDE form, either general or coefficient. In other words, once data isinput and stored in the structure 250, this data may be expanded ortransformed into another form used in subsequent processing steps. Inother words, the following may be used in connection with converting GUIdata into PDE format for each application mode.

It should be noted that in the following example, the GUI or input datais stored in a temporary or tmp structure for each application mode. Thecombined system of PDEs may be formed using as input each of the tmpstructure for each application mode. An embodiment may store arepresentation of the combined PDE system in the fem structure asdescribed in more detail elsewhere herein.

The application mode properties in the fields equ and bnd in the appl{i}structure are rewritten as symbolic expressions by using an applicationmode dependent set of transformation rules, e.g., for heat transfer.

-   -   tmp{i}.equ.c{j}=appl{i}.equ,k{j};    -   tmp{i}.equ.a.{j}=appl{i}.equ.htrans{j};    -   tmp{i}.equf{j}=appl{i}.equ.Q+appl{i}.equ.Text{j}+appl{i}.equ.Camb{j}*(appl{i}.equ.Tambtrans{j}        ̂4−appl{i}.dim̂4)    -   tmp{i}.equ.da {j}=appl{i}.equ.rho*appl{i}.equ.C{j}    -   by looping over the subdomain index j. The field appl{i}.dim is        the physical quantity, the temperature. Similarly the boundary        subdomain properties are rewritten by the rules:    -   tmp{i}.bnd.q{j}=appl{i}.bnd.h{j};    -   tmp{i}.bnd.g{j}=appl{i}.bnd.q{j}+appl{i}.bnd.h{j}*appl{i}.bnd.Tinf{j}+appl{i}.bnd.Const{j}*(appl{i}.bnd.Tamb{j}̂4−appl{i}.dim.̂4);    -   when the type is QG and as    -   tmp{i}.bnd.h{j}=1;    -   tmp{i}.bnd.r{j}=appl{i}.bnd.T{j};    -   when type is T.        The remaining type cases, QG0 and T0, are simple cases of the        above cases, where all left hand side terms are zero, except the        bnd{i}.h term.

It should be noted that the foregoing rules to produce symbolicexpression may vary with application mode. For example, the foregoingrules may be used in connection with forming coefficients for heattransfer application mode. As known to those of ordinary skill in theart, the techniques may be applied to forming coefficients for otherapplication modes. It should be noted that functionality associated withthe above description is included in one embodiment as a function“appl2fem” as described in the FEMLAB V1.1 Reference Manual from ComsolAB, 1999.

The foregoing may be performed for each of the application modes, i, toexpand or transform data into PDE form data included in the applicationmode structure tmp{i}. This structure tmp{i} includes a representationof the physical properties as instances of the PDE formulae of FIG. 8 orFIG. 9.

The fields usage and border for the tmp data structure may be copiedfrom the corresponding fields in the data structure 250. The field dim256 may be updated with another variable name, and introduce a relationbetween the physical quantity and the dependent variables, andintroducing this relation when the equ and bnd fields are transformedinto the tmp structure.

The submode setting described elsewhere herein in more detail, forexample, in connection with FIG. 3, may be used in determining thenumber of variables. The submode setting may be used to distinguishbetween a stationary and time-dependent problem. In certain applicationmodes, such as structural mechanics, the number of dependent variablesin the application mode may vary in accordance with a submode setting orselection. For example, PDE formulation as described in connection withFIG. 8 does not provide for a second order time derivative. Thus, forexample, in application modes related to structural mechanics, where thedisplacements are the dependent variables, it may be desirous to add thevelocities of the displacements as dependent variables in addition tothe displacements. Thus the application mode describing the system mayinclude twice the number of variables for the time-dependent subdomainthan for the stationary.

What has just been described are processing steps that may be includedin an embodiment in connection with expanding or converting input data,as using the GUIs, into a PDE form, such as general or coefficient.

An embodiment may continue by merging the formulae associated with aplurality of application modes and PDEs into a single system of combinedPDEs. Appending the subsystems in the order they are specified in eachof the fem.appl 254 creates the composite system. In one embodiment, theaffected fields in the data structure 250 structure may include dim 256,form (additional field in area 270 indicating problem form as general orcoefficient in this example), equ 258, bnd 260, border 262, and usage264.

The dim field 256 of the composite system may be obtained byconcatenating the dim field lists from each of the application modesappl{i} 254. The default form of the composite system is the mostgeneral form of the subsystems, where “general” is the most generalform, and “coefficient” is the least general form.

The conversion of a PDE in coefficient form to general form is describedelsewhere herein. The output form may be “forced” to general form byforcing the conversion also if none of the appl{i} application modes arespecified in general form. A value may be stored in an additional fieldthat may be included in an embodiment of the data structure 250, such asan additional field in the area 270, indicating the type of problemform, for example, as one of general or coefficient in this embodiment.

The equ 258 and bnd 260 fields in the data structure 250 may bedetermined using corresponding fields appl{i} in the application modes,after each application structure has been converted to therepresentation of the PDEs, and the desired output form, according toFIG. 11. The coefficients in the second row may be deemed “weakly”coupled in the sense that the corresponding coefficients in thecomposite system are block diagonal. This may limit the coupling betweenthe subsystems. By using general form, however, there are no limitationson the composite system. In this embodiment, the border field 262 in thedata structure 250 may indicate a list of on/off, one for each solutioncomponent. The usage field 264 may be determined using the usagematrices, such as 254 e of each subsystems, by concatenating usage listsas rows in a matrix.

Thus, one technique for combining PDEs may be represented by thefollowing pseudocode-like description:

Gpos=0; for i=1 to Nappl j=Ndim (i); for k=1 to Nsubfem.equ.da{k}(gpos+(1:j),gpos+(1:j))=tmp{i}.equ.da{k};fem.equ.c{k}(gpos+(1:j),gpos+(1:j))=tmp{i}.equ.c{k};fem.equ.al{k}(gpos+(1:j),gpos+(1:j))=tmp{i}.equ.al{k};fem:equ:ga{k}(gpos+(1:j))=tmp{i}.e.qu.ga{k};fem.equ.be{k}(gpos+(1:j),gpos+(1:j))=tmp{i}.equ.be{k};fem.equ.a{k}(gpos+(1:j),gpos+(1:j))=tmp{i}.equ.a{k};fem.equ.f{k}(gpos+(1:j))=tmp{i}.equ.f{k}; end for k=1 to Nbndfem.bnd.q{k}(gpos+(1:j),gpos+(1:j))=tmp{i}.bnd.q{k};fem.bnd.g{k}(gpos+(1:j))=tmp{i}.bnd.g{k};fem.bnd.h{k}(gpos+(1:j),gpos+(1:j))=tmp{i}.bnd.h{k};fem.bnd.r{k}(gpos+(1:j))=tmp{i}.bnd.r{k}; endfem.border(gpos+(1:j))=tmp.border(1:j);fem.usage(gpos+(1:j),:)=tmp.usage(gpos+(1:j)); gpos=gpos+j; end

In the above description, the “Nsub” denotes the number of subdomains inthe geometry, “Nappl” denotes the number of application modes, and“Nbnd” denotes the number of boundaries. “Ndim(i)” is the number ofdependent variables of the application mode.

The result of performing the foregoing is the data representation of thesystem of PDEs corresponding to the full multiphysics system of thecombined PDEs for the selected application modes. In an embodiment, theabove procedure is documented as function “multiphysics” in the FEMLABV1.1 Reference Manual.

It should be noted that if the systems represented in the structuretmp{i} are converted to general form, the foregoing pseudocodedescription may be applied to the coefficients, for example, asrepresented by ga (corresponding to “gamma”), f, g, r.

An embodiment may include storing the data for the PDEs and boundaryconditions for each application mode in a more compact format using, forexample, the ind field in appl{i}.equ and appl{i}.bnd. In oneembodiment, as also described elsewhere herein, the ind fields may beimplemented each as a vector with length equal to the number ofsubdomains or boundaries. For each subdomain, the corresponding entrydesignates a domain group or 0 for no group. Similarly the field bnd.indhas the corresponding meaning for boundaries. When the ind field is notgiven, each subdomain or boundary forms a separate group. It should benoted that when using this compact format representation feature and theappl{i}.equ.ind or appl{i}.bnd.ind fields are different for the selectedapplication modes, the ind fields may also be merged or combined intothe ind fields in fem.equ.ind (subfield of 258) and fem.bnd.ind(subfield of 260). These fields may have a minimal common set ofsubdomain or boundary groups. This may be determined, for example, byjointly sorting the groups in the application modes and removingduplicates.

In one embodiment, the solution procedure uses the Finite Element Method(FEM) to solve the system of PDEs in coefficient and general form, forexample, as represented in FIGS. 8 and 9. This is described, forexample, in “The Mathematical Theory of Finite Element Methods”, S. C.Brenner, L. R. Scott, Springer-Verlag, ISBN 3-540-94193-2. This is awell-known procedure, but has been adapted to specifically fit aparticular context of one embodiment. In this embodiment, the firstequation in FIG. 8, element 142, and the first equation in FIG. 9,element 152, may be multiplied with an arbitrary test function v, andintegrated over the domain Ω, such as integrated by parts, for example,using Green's formula. The boundary integral may be replaced using theNeumann boundary condition. Furthermore, the Dirichlet boundarycondition may be multiplied by an arbitrary test μ function andintegrated on the boundary, and obtain the variational formulation ofthe full problem: Find u_(k) and λ_(m) such that for all v, m, l=1, . .. , N, and m=1, . . . , M the equations in FIG. 12 and FIG. 13 hold, forcoefficient and general form, respectively.

As described in connection with one embodiment, the PDE system to besolved may be passed to a solver algorithm for PDEs that uses the finiteelement method. In addition to the data structure 250 that may includethe representation of the PDEs, two sets of constraint matrices may beused and are referred to and described in more detail elsewhere hereinin connection with particular features that may be included in anembodiment.

The finite-dimensional function space is the set of piecewise linearfunctions on a triangulation τ of the domain Ω. u and Λ may beapproximated, for example, using the formulae 304 of FIG. 14, whereφ_(l) is linear on each element, continuous, and 0 on all node points inthe triangulation except the node point I. ψ_(K,L) is a delta functionat a vertex L on a boundary element K.

By using the test functions φ_(J) and ψ_(K,L) on the weak form of thePDE in coefficient form, it may be determined that the formulae 306 ofFIG. 15 applies for all J and l, and that the formula 308 of FIG. 16apply for all K, L, and m. The finite element discretization representedby 310 of FIG. 18 may be determined. It should be noted that theintegrals as included in the formulae 310 of FIG. 18 may be computedusing a Gauss quadrature within each element. The formula correspondingto those of 306 of FIG. 15 and 308 of FIG. 16 for general form may berepresented as in formulae 312 of FIG. 17.

With reference to the data structure 250 described elsewhere herein,when the integrals in 310 of FIG. 18 are computed, the initial value infem.init 266 may be used as values for the solution when it occurs inthe expressions in the PDE coefficients and boundary conditions.

By numerically computing the matrices according to the foregoingformulae, the systems of equations represented in FIG. 19 and FIG. 20may be determined. In particular, referring to FIG. 19, shown areformulae 320 in coefficient form, and referring to FIG. 20, shown areformulae 322 in general form, in which C, AL, BE, A, and Q areN_(p)N-by-N_(p)N matrices, and F, GA, and G are N_(p)N vectors. H is aN_(e)nM-by-N_(p)N matrix and R is a N_(e)nM vector. The DA matrix isused in time-dependent and eigenvalue problems. When these matrices areproduced, the first index in the index list in FIG. 18 is expandedfirst.

Linear solvers, nonlinear solvers, time-dependent solvers and eigenvaluesolvers may be used in solving systems of PDEs of FIG. 19 in coefficientform, and PDEs of FIG. 20 in general form. Such solvers, or solvingtechniques, are generally known in the numeric literature, for example,such as in “Numerical Methods”, G. Dahlquist, Å. Björk, Prentice Hall,1974, ISBN 0-13-627315. In one embodiment, a technique may be used togenerate the Jacobian for nonlinear solvers and for solvers oftime-dependent problems. This technique may be used in systems ingeneral form, or PDE systems that have been converted from coefficientform to general form, for example as described in connection with theformulae 240 of FIG. 11.

It should be noted that use of PDEs in general form may be used to moreefficiently provide PDE solutions in solving for non-linear systems ofequations. One technique, as described elsewhere herein in more detail,may utilize the general form to derive a Jacobian. This may be moreefficient than using the coefficient form for solving for non-linearsystems. Using this general form to derive the Jacobian, the Newtonmethod may then be used. FIG. 10 shows an iteration of using the Newtonmethod.

For the combined system or multiphysics, the solution may be stored inthe field fem.sol 268 of the data structure 250. In one embodiment, thesolution field 268 may represent the solution to a PDE system as avector having the same number of elements as the corresponding U.Similarly fem.init 266 may include the initial value for the nonlinearand time-dependent solvers. For time-dependent solutions, there may beseveral columns in fem.sol 268, one for each point in time.

In one embodiment, nonlinear equations in general form may be solved byNewton iterations.

Referring now to FIG. 11, shown is an example of the formulae that maybe used in an embodiment in converting from coefficient to general formof the PDEs. The conversion from coefficient to general form may beperformed on the app{i} structure for each application mode separatelyin accordance with the form desired, for example, as may vary inaccordance with equation or system type. For example, if a system beingsolved is in coefficient form and it is a non-linear system, it may bedesired to convert from the coefficient form to general form using theformulae 240 of FIG. 11 in conjunction with the other formulae 140 forcoefficient form to produce a system of PDEs of the general form, suchas those represented by the formulae 150 of FIG. 9. This conversion mayalso be performed in accordance with a user selected or specified mode,for example, as may be included in an embodiment. Other embodiments mayperform this conversion from coefficient to general form in connectionwith other function that may be included and vary with implementation.

The formulae 240 of FIG. 11 may be used to derive F, F, G, and R fromd_(a), c, α, γ_(l), β, a, f, q, g, h, and r as included in the formulae140 of FIG. 8. This may be performed, for example, as by symbolicmanipulation of the mathematical expressions.

The discretization by the finite element method, given a nonlinearsystem of equations in as in the general form of FIG. 20, may be viewedas the problem p(U)=0, where U is the vector of unknown coefficients ofthe finite element solution to the PDE problem. In this instance, DA=0since this problem is stationary. The LaGrange multipliers, A, may beconsidered auxiliary values Λ=Λ(U) which may be assumed to beeliminated. For the solution of the discretized system, an affineinvariant form of the dampened Newton method may be applied: Given aninitial guess, U⁽⁰⁾; a sequence of iterates U^((k)) is computed by theiteration formula 326 in FIG. 21, where J(U)=∂ρ(U)/∂U, and λ_(k)ε(0; 1]denotes a damping factor.

Subsequently solving for ΔU^((k)) above may utilize the solution of alinear system of equations. If J(U) is chosen as the exact Jacobian, theiteration formula above may be interpreted as the finite elementdiscretization of a linearized equations in coefficient form by applyingthe settings in 324 of FIG. 10. The coefficients in the coefficient formPDE may be formed as symbolic derivatives of the coefficients in thegeneral form PDE with respect to the solution, and its gradient.

It should be noted that the “Active in this subdomain feature” forselective inclusion or variation of a variable in a system, may beimplemented in one embodiment by adding a constraint to the H and Rmatrices to not-a-number in IEEE arithmetic. One row containing theconstraint may be added to H and R for each node point in thedeactivated subdomains and dependent variables.

It should also be noted that when the system of PDEs is assembled, forexample, according to FIG. 18, the variables not to solved for may beused in the expressions for PDE coefficients and boundary conditions. Inone embodiment, the “solve for variable feature” may be implemented byadding a constraint to the H and R matrices that constrains the solutionin the node points the value of the previous solution in the same point,one row containing the constraint is added to H and R for each nodepoint and dependent variable.

The foregoing description may be used in forming a multiphysics modeland solving for selected variables. Steps of one embodiment may besummarized in the form of a flowchart and accompanying description.

Referring now to FIG. 22 and FIG. 23, shown is an example of anembodiment of a flowchart of steps of one method for automaticallyspecifying one or more systems of PDEs, representing them in a singlecombined form, and solving a system of PDEs. At step 210, a firstapplication mode is selected. It should be noted that each applicationmode corresponds to a particular system being modeled. The selection ofone or more application modes may be performed, for example, in oneembodiment using the GUI 30 of the previously described FIG. 3. At step212, a determination is made as to whether the processing steps formedby the loop at the top of step 212 are complete for all applicationmodes. If a determination is made at step 212 that processing of all theapplications modes selected at step 210, control proceeds to flow pointA. Otherwise, control proceeds to step 214, where the physicalproperties associated as active with the current application mode aredetermined. The physical properties associated with an application modemay be selected, for example, in connection with GUI 60 of FIG. 4.Control proceeds to step 216, where the boundary condition for thecurrent application mode is determined. The boundary conditions may bedetermined, for example, using the GUI 70 of the previously describedFIG. 5.

Control proceeds to step 218, where data structures are created andinitialized using the physical properties and boundary conditionsspecified for the current application mode in connection with theprocessing, for example, of steps 214 and 216. At step 220, thecoefficient PDEs may be formed using physical property and boundary dataobtained in connection with steps 214 and 216, and accordingly stored inthe data structure created and initialized at step 218. Recall, aspreviously described, that the PDE in coefficient view, or form, may berepresented as described in connection with the formulae 140 of FIG. 8.Additionally, recall that a temporary data structure may also be usedwhen forming the coefficients for each application mode. At step 222,the general form of the PDE may also be formed. Accordingly, the datastructure initially created at step 218 may be updated to include theinformation about the general form for the PDE system. It should benoted that the general PDE formed at step 222 may be as represented bythe formulae 150 previously described in connection with FIG. 9. Atemporary data structure may also be used in storing data for thecoefficients formed in connection with processing of step 222, similarto that as may be used in connection with step 220.

An embodiment may provide an option to allow for data entry, display andmodification in coefficient form, general form, or both of these forms.If more than one is included in an embodiment, there may be a default,or a user selection option. Thus, processing associated with steps 220and 222 may be optionally performed in accordance with what may beincluded in an embodiment, and may additionally be in accordance with auser selection. One embodiment provides for data entry, modification,and PDE solving associated with an application mode in eithercoefficient view or general form. Coefficient view may be selected fordata entry and modification with the additional user input selection ofproducing general form, and solving PDEs using either form. If generalform is selected for data entry without coefficient view, PDE solvingmay be performed, by default, using a system of equation in generalform. As known to those of ordinary skill in the art, in accordance withthe PDE system being solved, solving using the general form may be moreefficient and desired over use of coefficient form. For example, insolving PDE systems for non-linear systems, use of the general form maybe more efficient.

At Step 224, an embodiment may include, optionally, functionality tomodify the boundary conditions and/or PDEs of the current applicationmode. It should be noted that if an embodiment includes the function ofmodifying a PDE for each application mode, the previously describedlocking mechanism may operate differently since PDEs may change perapplication mode.

At step 226, a next application mode may be selected. Control proceedsto step 212 where a determination is again made as to whether processingall the application modes is complete.

When all the application modes are selected and done being processed inconnection with the processing steps formed by the loop beginning with adecision at step 212, control proceeds to flow point A, step 230, wherePDEs for all the previously entered application modes are combined,forming a combined PDE system. In other words, the result is a singlePDE system representing the combination of all the previously describedsystems in connection with all the previously specified applicationmodes. It should be noted that in one embodiment described in moredetail elsewhere herein, data associated with the PDE of eachapplication mode may be stored in a temporary structure for eachapplication mode. At step 230, in this instance, the temporary datastructures may be used as input for producing the combined PDE system ormultiphysics system of PDEs. At step 231, an embodiment may optionallyprovide for modifying the combined PDE system, or other systems. Controlproceeds to step 232, where the PDEs, or variables associated with PDEs,may be solved. An embodiment may provide variations as to what variablesor PDEs may be solved for in the processing of step 232. One embodimentmay allow the user to select solving for one of the PDEs associated withindividual application modes, the combined PDE system, or variables fromdifferent PDEs. Control proceeds to step 234 where the processing of theflowchart 200 stops.

What has just been described is the general processing of the overallsystem for automatically forming one or more sets of PDEs associatedwith one or more application modes or systems. These systems may becombined into a single, combined PDEs system. A programming module, suchas the finite element solver that may be included in the Modeling andSimulation Module 222, may solve a system of PDEs. The finite elementsolver, for example, may solve a single system of PDE corresponding to asingle application mode, may solve for the combined PDE system, forexample, as computed or determined in connection with the processingstep 230. An embodiment may also solve for one or more variablesassociated with one or more application mode using any one of a varietyof known solving techniques.

What will now be described in more detail is how user definedapplication modes and user defined applications may be used in theforegoing system and with the techniques described herein. Generally, auser defined application mode in one embodiment may be an equivalent toa predefined application mode, such as heat transfer, describedelsewhere herein. An “application mode” is distinguishable from an“application”. In this embodiment, an application may be associated witha user defined subclass from a class, for example, that may beassociated with an application mode. An application may be defined by auser, for example, when it may be useful to create a specialized ornarrower definition of an existing class corresponding to an applicationmode. In this way, routines and code common in more than an applicationmay be shared since, fore example, in this embodiment, functionality ofone or more applications (subclasses) may be inherited from anapplication mode.

Alternatively, a user-defined application mode rather than a userdefined application may be more appropriate, for example, when suchfunctionality is not common or bears little or no relationship infunctionality to an existing application mode.

In one embodiment, an application mode may be predefined, such asDiffusion or Heat Transfer included in one embodiment of the software19, or user-defined. User-defined application modes may be created usingan Application Program Interface (API), such as those described in theFEMLAB V1.1 Application Program Interface manual. In contrast to theuser defined application mode is the user-defined application. Adifference between the user-defined application mode and user-definedapplication is that a user-defined application may be much morespecialized, for example, regarding the geometry, modeling, meshing andthe GUI appearance. Use of the API allows users to add new functionalityto FEMLAB or remove functionality in order to tailor software of anexisting application mode to better fit a particular use as may beassociated with a particular user-defined application.

In one embodiment, a user may create and define a user-definedapplication mode and application. These may be created using classes andsubclasses in connection with an object oriented approach in which useof objects and classes allows for the addition of new data types andoperations, for example, as may be implemented using MATLAB. Theoperations and functions that operate on class objects are known asmethods collected together in a class directory. The class directoryincludes a constructor for that class. Generally, a predefinedapplication mode, such as one for heat transfer, may be created as aclass. A user defined application may be defined as a subclass of one ofthese classes. In this manner, the functionality of an existingapplication mode may be inherited by a new user defined application withadditionally having some or all of its functionality overloaded by asubclass allowing for a user to create an application with desiredbehavior. An application mode may also be defined a the same level asthe predefined application modes, such as heat transfer. These userdefined application modes may have the same status and use as thepredefined application modes. In particular, both predefined and userdefined application modes may be used as one of the application modes,for example, when forming a combined multiphysics system as described inmore detail elsewhere herein.

An application mode may be created as a class. These classes may berepresented in a hierarchical structure. There are a set of base classesat the top of a hierarchy containing the main functionality. Theapplication modes may inherit from base classes, sometimes throughconvenient intermediate classes that may include methods definingfunctionality common to several application modes. An example of theclass hierarchy may be found in FIG. 24, element 500, as described inmore detail elsewhere herein. An application mode may be created bydefining parameters on the boundary and the inner domain that willdefine the equations to be solved, and how to specify these parametersin the GUI. For more streamlined design of the application modes, theavailable solvers and the initial conditions, post processingexpressions, and name of dependent and independent variables may also bemodified.

An application mode has a constructor, for example, such as inconnection with FIG. 28 described in more detail elsewhere herein. Theinformation for an application mode may be stored in the applicationmode object and in the fem.appl-structure also described elsewhereherein. Table 510 of FIG. 27 includes properties that may be included inone embodiment of an application mode object. These properties areeither inherited from the parent objects, or may also be set explicitly.Table 514 of FIG. 29 includes a listing of the methods that may existeither directly in the application mode class, or in any of the parentclasses. The column to the right in this table 514 describes what themethods do.

Additionally, a set of methods may be used by the GUI to set up solversand dialog boxes as well as submodes for the application modes. In oneembodiment, these methods are:

-   -   bndinfo sets up boundary conditions dialog box    -   equinfo sets up PDE coefficients dialog box    -   pdeinfo contains info about available solvers, solution forms,        and submodes    -   sub_conv gives the relation between old and new variables when        changing submode

Other important methods are the set and get methods that allows forsetting and getting of the application mode object properties.

In one embodiment, to define a user-defined application mode, a minimumset of definitions and routines or methods are defined. These includethe constructor, appspec, bnd_compute, and equ_compute. appspec is aroutine for defining the parameters used in the interior and on theboundaries. Routines equ_compute and bnd_compute define how to set upthe equations based on this information from appspec.

In order to use the application mode from the GUI the equinfo andbndinfo methods may be implemented in the application mode class. Thesemethods define how to set up the dialog boxes in the GUI for specifyingthe parameters.

In contrast to a user-defined application mode is a user-definedapplication. In the user-defined application, for example, overloadingmay be performed of some or all of the above methods, in addition to themethods for setting up the GUI, for example, such as fldrawmode,flboundmode, flpdemode, flmeshmode,flsolvemode, flplotmode in connectionwith set up some of the menus and toolbars for draw, boundary, PDE,mesh, solve and plotmode, respectively.

Referring now to FIG. 24, shown is an example of a class structure thatmay be included in an embodiment in which a user may define applicationmodes. At the base of the class structure is the class flbase tofacilitate overloading of generally provided functionality that may beincluded in an embodiment. The application mode object structure maydivide the application mode objects in accordance with two particularcriteria: geometry dimension and application modes. For geometrydimension, there are two geometry dimension dependent base classes fldland fld2 in which methods may implement dimension dependentfunctionality, such as draw mode menus, toolbars, mesh drawings, and thelike. For application modes, there are three application module baseclasses of: flpde, which is the parent of all application modes, flsmeand flcem which are other classes that may be defined in accordance withother modules and associated functionalities. In flpde, allfunctionality may reside that is common to all application modes andthat is also not dependent on geometry dimension. All application modesmay be implemented as subclasses to this class. Additionalapplication-dependent classes may be added to support new applications.They may, for example, be implemented as subclasses of flpde or anotherapplication mode. In these class directories, methods that implementapplication dependent functionality, such as specific dialog boxinformation, and the like may reside. Referring to the structure of thehierarchy illustrated in 500, the application dependent classes takeprecedence over the geometry dimension classes which also takeprecedence over the application module class so that, for example, amesh drawing method in the flpde class may be overridden by the generic2-D mesh drawing method. Note that the structure 500 may be only aportion of the entire class structure included in an embodiment.

Together with methods, the application objects may define specificproperties and behaviors that define an application in the GUI.Referring to FIG. 25, shown are sample 1-D (one-dimensional) applicationmodes 502 and 503. In combination, these two tables may define allpredefined application modes included in one embodiment. All 1-Dapplication objects inherit from the application module base class flpdeand the geometry class fl1d.

Referring now to FIG. 26, shown are 2-D (two dimensional) applicationmodes that may be defined in an embodiment. The application modesdefined in 506 and 508 may include all application modes for 2-Dapplication mode objects. All 2-D application mode objects may inheritfrom the application module base class flpde and the geometry base classfl2d. All of these classes are subclasses of fl2d and an applicationmode class. The application mode classes, in turn, are subclasses offlpdec or flpdeg that represent the coefficient and general PDE form,respectively. Note that the PDE mode classes flpdecl, flpdegld, flpdec2dand flpdeg2g all accept the number of dependent variables as an inputargument thus enabling the creation of PDE modes with an arbitrarynumber of dependent variables. Calling the constructor function withouta dimension argument results in a scalar application mode object.

Referring now to FIG. 27, shown is an example of properties of oneembodiment of an application object. Table 510 describes variousproperties of application objects. Parent is string containing the nameof the object class parent. The dim, name and parent properties areinitialized explicitly using the application class constructor. Otherfields may be inherited by the parent class but may also be initializedusing the constructor.

In one embodiment, the application being defined by a user may be asubclass to one of the application mode classes. In one example, supposea user wants to define a new application, myapp, based on the 2-D heattransfer mode flpdeht2d. A subdirectory may be created in a MATLAB pathcalled @myapp. An example of a constructor may look as in the codesnippet 512 of FIG. 28. In this example, the settings for submode, form,tdiff and sdim are from the parent class flpdeht2d. The dim property isexplicitly set to be default as may be defined by the methoddefault_dim.

In this embodiment that may use MATLAB, the behavior of MATLAB operatorsand functions for object arguments may be changed by overloading therelevant functions. This may be accomplished by defining a replacementmethod with the appropriate name residing in the new class directory atthe application level. A user may minimize the number of overloadedmethods in an application class being defined by a user by choosing themost appropriate application mode as its parent class. By using theoverloading functionality, parts of an existing application may bemodified to create application dependent functionality. For example,portions of a GUI, including menus, toolbars, and the like, may bemodified to better fit an application as well as methods for overloadingthe equation definitions.

One embodiment may include a set of methods to provide a portion of thefunctionality. Referring now to FIG. 29, shown is an example of anembodiment of a portion of functions that may be included in oneembodiment. The functions 514 may determine the variables and equationsdefining a problem. As described in more detail elsewhere herein, itshould be noted that the appl field of the fem structure includesapplication dependent data. Appl is a cell array that contains more thanone application mode for multiphysics problems. The foregoing methodsmay work in connection with a GUI and from the command line. Theconversion from the application mode structure in the appl field(s) maybe performed by invoking a function called the multiphysics function,which in turn uses another function to compute the equ, bnd, init, dim,usage, border, var, and form fields.

API functions may be included in an embodiment, for example, to allowfor adding menus and toolbars to the existing GUI. Additionally,overloading methods may be used, for example, to disable certainfunctionality associated with a method or provide for an alternative.

Referring now to FIG. 30, shown is an example of a GUI that may be usedin connection with adding an application to the existing GUI. Using theNew tab in the GUI 520, a user may browse through the applications. Theprocedure of adding a new user-defined application may be performedusing an API function, for example, fladdappl. Using such an API, anapplication may be added to the application tree and, optionally,associated text and FIG. The description and FIG. may be displayed whenthe user defined application is selected. For example, the GUI 520 has auser defined application of “IN-PLANE WAVE GUIDE” selected in 522.Accordingly, an associated image is displayed in 524 and text in 526.

What will now be described is another example of a user-definedapplication for modeling transmission signals with frequencies in themicrowave range, for example, as may be used in the telecom industry.The waves are transmitted through a waveguide with a rectangular crosssection. If the wave is bent, the elbow may cause scattering effectspreventing the wave from being transmitted through the waveguide. In thefollowing model, a TE wave is modeled in which there is no electricfield in the direction of propagation. The dimension of the waveguideand frequency are chosen so that the only mode that can propagate is theTE₁₀ mode, that is where the electric field has only one non-zerocomponent that is sinusoidal and vanishes at the walls of the waveguide.

A waveguide may be designed to transmit only frequencies in a narrowband. This band-pass effect may be achieved using a resonance cavityformed by putting conducting posts protruding into the waveguide. Theposts may be, for example, metal screws or tuning screws. Equations usedto calculate effects may be derived from the wave equation. Time may beeliminated assuming a harmonic planar wave resulting in Helmholtzequation for non-zero electric field component as represented byequation 530 in FIG. 31 in which k is the wave number in the propagatingdirection. The relation between the wave number k and the frequency fand wavelength λ is represented by equation 532 in which c denotes thespeed of light.

In this instance, there are three kinds of boundary conditions in themodel. At the entrance boundary in which there is a vertical line atx=0, there is an absorbing condition with an incoming sinusoidal wave asin equation 534. The right hand side of 534 is the driving force of theincoming wave. d is the width of the waveguide and yo is the ycoordinate of the lower left corner of the waveguide. The wave numberdepends on the wave number in the direction of propagation ky as in 536.536 may be derived from solving analytically for a straight waveguidethe wave number in the transversal direction may be defined by twice thewidth of the waveguide. This results in the final expression for thewave number in the propagating direction as a function of the incomingwavelength and width of the waveguide according to 538. At the exitboundary there is an absorbing condition represented as 540 and thewalls are assumed to be perfect conductors so that the tangentialcomponent of E vanished as in 542. The velocity of light may becalculated from the material parameters and the wavelength is calculatedfrom the frequency and velocity. The cut-off frequency may be calculatedfrom the analytical solution of a straight waveguide as in 544. No wavesbelow this frequency are transmitted through the waveguide.

Using the foregoing waveguide and techniques disclosed herein, theforegoing complexity may be hidden using a GUI. A feature calledfrequency analysis may be implemented in connection with the waveguideapplication. What will now be described is an overview of how this maybe implemented in one embodiment.

The draw mode for this feature may be implemented using overloading toimplement an alternative draw menu and corresponding toolbar buttons.Toolbar icons may be stored in the application class directory asbitmaps. In this example, the draw menu is an alternate menu thatincludes 5 items: draw mode, straight waveguide, elbow waveguide,geometry parameters and the standard draw menu item Properties. The drawtoolbar contains the toolbar buttons straight waveguide, elbow waveguideand geometry parameters. In connection with each of the waveguides, acorresponding FIG. or image may appear in the GUI. Parameters may bevaried in accordance with each of the waveguides by overloading existingmethods, for example, by overloading an existing method objdlg in whichthe geometry is parameterized and the parameters may be stored in a userdefined portion of the fem structure on creation. It should be notedthat this is a portion of memory allocated for use by the user and notused in this example by the existing methods. Additionally, otherfunctionality may be disabled using overloading, such as to disableimporting geometries and cut and paste functionality.

Boundary conditions are “hardwired” according to the equations dependingon parameters, for example, as may be defined in the PDE specificationGUI. The Boundary menu and related mode buttons may be completelyremoved using overloading of existing methods. Existing methods are usedto define the boundary conditions. Some of the standard PDE mode menuitems are removed by overloading the existing method(s). The mesh moderemains the same. Similarly, other modes that are defined and thereGUIs, toolbars and the like, may be used and techniques, such asoverloading, may be used to implement these as may be desired inaccordance with this example and others.

In connection with the waveguide, due to the conversion oftime-dependent PDE to a harmonic wave equation, the existing applicationmode AC Power Electromagnetics mode may be used. The new waveguideapplication being defined may be implemented, for example, as a subclassto its class, @flpdeac. the waveguide class, named @flwaveguide, may becreated on the same directory level as the parent class @flpdeac. Anexample class constructor is included in 550 of FIG. 32.

Parameters of the waveguide may be specified as in 552 of FIG. 33 and554 of FIG. 34. The entrybnd and exitbnd fields may be used by abnd_compute method to set the appropriate boundary conditions. Thestartpt field may be used to define the incoming sine wave on the entryboundary. The freqs field includes the frequency vector that may be usedby the frequency analysis feature.

The geomparam structure is a 2 element structure array includinggeometry parameters for straight and elbow waveguides that may includefields as in 556 of FIG. 35. The geometry boundaries may be formed by aset of existing objects using the parameters entrylength, exitlength,width and radius. These existing objects may be combined into a singlenew geometry object using, for example, an API that forms a singleobject that is a cell array containing the existing objects.

If the resonance cavity is operative, such as by checking a resonancecavity checkbox on one of the GUIs, the protruding posts are subtractedfrom the geometry. In this instance, the posts may be creates as a setof solid rectangular objects using the specified cavity parameters. Theresulting mapping matrices representing this subtraction result mayrelate the curve and point indices in the input geometries,respectively, to their new indices in the new geometry object. Knowingthe order in which the basic object were created to make the newgeometry, the index corresponding to each of these basic objects in thefinal geometry may be calculated and stored in the user structure.

Of the existing methods previously described in connection with 514 ofFIG. 29, 6 may be overloaded. These may include, for example:default_equ, equ_compute, default_bnd, bnd_compute, default_var, andposttable. Equ_compute returns the PDE coefficients computed fromparameters defined in the appl.equ structure. The ind field includes 1since there is only one subdomain. Default_bnd method defined defaultboundary conditions. Bnd_compute computes boundary conditions from thematerial parameters and the frequency defined in appl.equ. The entrybnd,exitbnd, and startpt fields in the fem.user structure are used to placethe correct boundary conditions on the correct boundaries. Default_varreturns an empty cell array disabling default scalar variables. Itshould be noted that this method may have been used to define theincoming frequency as a scalar subdomain-independent variable instead ofas part of the appl.equ structure. In this instance, the frequency maybe specified in connection with a different dialog box, such asApplication Scalar Variables rather than in connection with the PDEspecification dialog box. In posttable, the post processing data isdefined. The output variables, descriptions an evaluation expressionsmay be defined.

Following is an overview of the overloaded GUI methods in the Waveguideapplication. It should be noted that the following GUI methods may beincluded in one embodiment. Other embodiments may include other methodsor variations of these. Method appspec may be used to define thevariable names in the bnd and equ structures of the fem.appl field.appspect for the waveguide may return a structure including fieldsdefining the PDE variables to be scalars and the boundary variables tobe boundary coefficients of problem dimension. This information may beused by the appl2fem routine, for example, as described in the FEMLABV1.1 Reference Manual, FEMLAB V1.1 User's Guide, and FEMLAB V1.1 ModelLibrary, by Computer Solutions (COMSOL) Europe AB. Parts of otherfunctionality described herein may also be fund in the foregoingdocumentation. This information may also be used by the PDEspecification dialog box. The method pdeinfo is used to define thedefault abbreviation for an application. Only the standard submode,coefficient form and stationary linear solver are available. The equinfomethod returns equations, descriptions and parameter names to bedisplayed in connection with the PDE specification dialog box. Thereturned cell array of equations in this instance includes one equationdue to the stationary linear solver being the only solver. Theflboundmode method removes the standard Boundary menu from the GUI andthe corresponding boundary mode toolbar is removed from the flviewtbgmethod. The importing of geometry objects may be disabled by theflimpmenu method returning an empty structure. Flmphmenu removes themultiphysics menu from the GUI by also returning an empty structure ofmenu handles. The flpdemode method returns a PDE menu structureincluding only 2 items, PDE mode and PDE specification. flsolvemodemethod returns a Solve menu structure includes the items solvemode,solveproblem, frequency analysis, and parameters. flmeshcolvtbg replacesthe standard restart button with a frequency analysis button in which acorresponding icon is stored as a bitmap in a directory. Similarly,methods in connection with the geometry parameters, initial conditionsand the like are modified and/or disabled in accordance with the desiredGUIs and functionalities for the waveguide mode. Finally, the waveguideapplication may be added to the model navigator, such as in connectionwith the GUI displayed in FIG. 3, by invoking a function. In oneembodiment, the following is an example invocation:

-   -   fladdappl(‘flwaveguide’, ‘In-plane Waveguide’)    -   in which a bitmap flwaveguide.bmp may reside in a class        directory. The bitmap may be displayed to the right of the Model        Navigator as previously illustrating in connection with GUI 520        of FIG. 30.

In another embodiment, a method is set forth that may be used inconnection with specifying non-local couplings of multiphysics systems.This method may also be used in connection with local couplings, forexample, as described previously. The method includes a scheme fordefining a plurality of variables, as discussed in detail below. Anon-local coupling, for example, may be used in coupling a value of aphysical quantity from one portion of a domain to another portion of thesame domain. In one embodiment, a non-local coupling may be used, forexample, to specify couplings when the values of a physical quantity ona boundary of a domain are used in a partial differential equation alongparallel lines extending into the domain. Additionally, a non-localcoupling may be used, for example, in specifying a coupling when thevalue of the integral over a portion of a domain is used in the boundarycondition of a partial differential equation. Local and non-localcouplings as well as the variables that may be used with each type ofcoupling are described in more detail elsewhere herein.

Furthermore, the method can include an analysis of a multitude ofgeometries. The data structures used previously can be extended tomultiple geometries by storing the previous data structure (fem datastructure) in a list in the extended data structure (xfem). Both ofthese are described in more detail below. Generally, for a geometrynumber g, the field x in the extended data structure occurs asxfemlem{g}.x, where xfem.fem{g} is the fem data structure repeated foreach geometry in the extended data structure for multiple geometries.When using the multiple geometry data structure, the field xfem.solcontains the solution, and solutions are no longer stored in fem.sol foreach geometry. A combined extended mesh for all the geometries is storedin the field xfem.xmesh. The coupling variables are stored in a list inthe field xfem.elemcpl. The extended mesh structure xfem.xmesh isdescribed in more detail elsewhere herein.

In one embodiment, there are three different forms of PDEs that may beused, namely, the coefficient form, the general form and the weak form.It should be noted that the coefficient form is most suitable for usewith linear or almost linear problems whereas the general form may beused for the non-linear problems. The weak form of an equation is moregeneral than the other two forms, and it is formulated as an equality ofintegrals. The weak form may be used, for example, in implementing pointand line sources. A problem in coefficient form can be converted togeneral form, and a problem in general form can be converted to weakform. The coefficient form and the general form are described elsewhereherein in more detail.

Assume that there are a number of Euclidean spaces, each equipped with acollection of domains, i.e., volumes, surfaces, curves, or points. Thedomains may be approximately subdivided into mesh elements, constitutinga mesh as described elsewhere herein using standard mesh generationtechniques, for example, as described in the text by Frey, P. J. &George, P. L., entitled “Mesh Generation, application to finiteelements”, HERMES Science Publishing, 2000. Commonly used mesh elements,as known to those of ordinary skill in the art, may include, forexample, tetrahedrons, triangles, and line segments. On each meshelement, local (barycentric) coordinates may be defined, for example, asdescribed in “Mesh Generation, application to finite elements” by Freyet al. Couplings including variables may be used to define relationshipsbetween multiple geometries as well as for a single geometry.

The starting point for the finite element method is a mesh, that is, apartition of the geometry into small units of a simple shape. In 1-D,the subdomains are partitioned into smaller mesh intervals or meshelements. The endpoints of the mesh intervals are called mesh vertices.

In 2-D, the subdomains are partitioned into triangles or mesh elements.This is only an approximation, since a boundary can be curved. The sidesof the triangles are called mesh edges and the corners mesh vertices. Amesh edge must not contain mesh vertices in its interior. Similarly, theboundaries defined in the geometry are partitioned (approximately) intomesh edges, boundary elements, which conform with the triangles if thereis an adjacent subdomain. There may also be isolated points in thegeometry that also become mesh vertices.

Similarly, for 3-D geometries, the subdomains are partitioned intotetrahedrons (mesh elements) having faces, edges and corners that may berespectively referred to as mesh faces, mesh edges, and mesh vertices.The boundaries in the geometry are partitioned into boundary elements(mesh faces). The edges in the geometry are partitioned into mesh edges.Isolated geometry vertices become mesh vertices.

It should be noted that mesh vertices are sometimes called node points.When considering a d-dimensional domain in the geometry, such as asubdomain, boundary, edge or vertex, then by its mesh elements, we meanthe d-dimensional mesh elements included in the domain. An embodimentmay include a function for creating and initializing a mesh structuredescribed herein.

For each of the geometries described herein, there is a mesh. Once amesh is defined using techniques also described elsewhere herein,approximations may be introduced for the dependent variables. Forexample, in considering a single variable u may be approximated with afunction that can be described by a finite number of parameters alsoreferred as the degrees of freedom or DOF. This approximation may beinserted into the weak equation to get a system of equations for theDOFs.

As an example, consider a mesh in one dimension consisting of two meshintervals 0<x<1 and 1<x<2. Consider a variable u that is representedwith linear finite elements. This means that on each mesh interval, thecontinuous function u is linear. Therefore, in order to characterize u,it suffices to specify the values of u at the node points x₁=0, x₂=1,and x₃=2. We denote these values U_(i)=u(0), U₂=u(1), U₃=u(2). Thesequantities U_(i), U₂, and U₃ are called the degrees of freedom. Thefunction u may be represented as:

u(x)=U ₁ f ₁(x)+U ₂ f ₂(x)U ₃ f ₃(x)

-   -   where f₁(x) are certain piecewise linear functions, called the        basis functions. Namely, f_(i)(x) is the function which is        linear on each of the mesh intervals, and is equal to 1 at the        ith node point and 0 at the other node points. For example,

${f_{1}(x)} = \left\{ \begin{matrix}{1 - x} & {{{if}\mspace{14mu} 0} \leq x \leq 1} \\0 & {{{if}\mspace{14mu} 1} \leq x \leq 2}\end{matrix} \right.$

-   -   The set of functions u(x) constitutes a linear function space,        called the finite element space.

If better accuracy is desired, another finite element spacecorresponding to quadratic elements may also be considered. Functions uin this space are second order polynomials on each mesh interval. Tocharacterize such a function u, node points can be introduced at themid-point of each mesh interval. For example, x₄=0.5 and x₅=1.5.Accordingly, corresponding degrees of freedom may also be introduced foreach of these points, U_(i)=u (x_(i)). Then on each mesh interval, thesecond degree polynomial u(x) is determined by the degrees of freedom atthe end points and the mid-point. Accordingly,

u(x)=U ₁ f ₁(x)+U ₂ f ₂(x)+U ₃ f ₃(x)+U ₄ f ₄(x)+U ₅ f ₅(x)

-   -   where the basis functions f₁(x) now have a different meaning.        f₁(x) is the piecewise quadratic function that is 1 at the ith        node point and a zero at the other node points. For example,

${f_{1}(x)} = \left\{ \begin{matrix}{\left( {1 - x} \right)\left( {1 - {2x}} \right)} & {{{if}\mspace{14mu} 0} \leq x \leq 1} \\0 & {{{if}\mspace{14mu} 1} \leq x \leq 2}\end{matrix} \right.$

In general, a finite element space may be specified by giving a set ofbasis functions. The basis functions can be represented using localcoordinates or element coordinates. For example, consider a mesh elementof a dimension d in an n-dimensional geometry having space coordinatesdenoted x₁, . . . , x_(n) Also consider the standard d-dimensionalsimplex represented as:

ξ₁=0, ξ₂=0, . . . ξ_(d)=0, ξ₃₊ ₊ξ_(d)ω1

which resides in the local coordinate space parameterized by the localcoordinates ξ₁ ξ_(d) If d=1, then the simplex is the unit interval. Ifd=2, then the simplex is a triangle with two 45 degree angles, and ifd=3 it is a tetrahedron. Now our mesh element can be viewed as a lineartransformation of the standard simplex. Namely, by letting the globalspace coordinates x_(i) be suitable linear functions of the localcoordinates ξ_(k), the mesh element may be the image of the standardsimplex. This means that in the local coordinate system, the corners ofthe mesh element have all ξ_(k)=0, except at for at most one k, forwhich ξ_(k)=1. When described in terms of the local coordinates, thebasis functions may assume one of a few basic shapes, for example, asdefined in the fem structure described elsewhere herein. With linearelements in 1-D, any basis function on any mesh element is one of thefollowing:

φ=ξ₁ φ=1−ξ₁ φ=0

The first two above are the shape functions in this example. Forquadratic elements in 1-D, the shape functions are

φ=(1−ξ₁)(1−2ξ₁) φ4ξ₁(1−ξ₁(φ=ξ₁(2ξ₁−1)

The foregoing examples are special cases of the Lagrange element. Todescribe the Lagrange element, one needs to fix a positive integer kthat is called the order of the Lagrange element. The functions u in theLagrange finite element spaces are piecewise polynomials of the degree ksuch that on each mesh element, u is a polynomial of degree k. Todescribe such a function, it suffices to give its values in the Lagrangepoints of order k. These are the points whose local coordinates areinteger multiples of 1/k. For each of these nodes p, there is a degreeof freedom U_(i)=u(p₁) and a basis function f₁. The restriction of thebasis function to a mesh element is a polynomial of degree at most k inthe local coordinates such that f₁=1 at node i, and 0 at all othernodes. Thus, the basis functions are continuous, and

$u = {\sum\limits_{i}\; {U_{i}f_{i}}}$

The Lagrange element of order 1 is called the linear element and theLagrange element of order 2 is called the quadratic element.

What will now be described are different types of variables that may beincluded in an embodiment for use in defining local and non-localcouplings. Other embodiments may include variables having differentnames and types including the concepts used herein. In one embodimentvariables may be used which are functions on the domains. An embodimentmay include basic variables, auxiliary variables, glued variables,mapped variables and integrated variables.

Basic variables may be defined and then other types of variables and newvariables may be defined in terms of existing variables. For example,the auxiliary variables and the glued variables, which are discussed indetail elsewhere herein, may be used to implement local couplingsbetween existing variables and new variables. A local coupling meansthat the value of a new variable in a point depends only on the valuesof the existing variables in the same point. A non-local coupling meansthat the value of the new variable at a point may depend on values ofexisting variables in distant points. Mapped variables and integratedvariables, which are also discussed elsewhere herein, may be used todefine non-local couplings between existing and new variables. Inaccordance with the method of this embodiment, it is possible to modelphysical quantities using local and non-local couplings.

In an embodiment, a basic variable V may be defined in terms of a numberof basis functions Fi (i is an index). The notion of basis function isthe usual one used in finite element analysis, see Zienkiewicz, O. C. &Taylor, R. L., The Finite Element Method, vol. 1, McGraw-Hill, 1994.

Each basis function is a function defined on some of the domains. Itsrestriction to each mesh element is a smooth function (often apolynomial in the local coordinates), and it is nonzero only on a fewmesh elements. To each basis function there is associated a parameterUi, which is called the degree of freedom (“DOF”). The variable V isdefined as the sum of Ui*Fi over all indices “i”, where the “*” operatordenotes a multiplication operation.

In the data structures of this embodiment, the basic variable names andtheir associated types of basis functions are stored in the fieldsxfem.fem{g}.shape, where g is the geometry number. This field is a listof shape function objects. Each shape function object defines a numberof basic variables, and the basis functions that are used for thesevariables. In one embodiment using object oriented programming conceptswritten in, for example, C++, a number of methods may be applied on theshape function objects. For example, there is a method that may computevalues of the basis functions which may be characterized as polynomialfunctions representing a shape function object. The domains ofdefinitions for the basic variables are determined by the fieldsxfem.fem{g}.***.shape, where *** may be equ, bnd, edg, or pnt.

It should be noted that an embodiment may include a shorthand featurefor defining which properties, shape function objects, and the likeapply to a plurality of domains. The plurality of domains may bereferred to as a domain group which is also referred to as the ind groupor field described elsewhere herein. For example, a model may be definedin which a first set of material properties applies to 50 domains and asecond set of material properties applies to another 50 domains. Ratherthan repeat the set of properties for each domain, a single set ofdefined properties may be defined and associated with a group ofdomains. An embodiment may include the concept of a domain groupimplemented in any one of a variety of different ways in which a singleset of properties is commonly applied to a plurality of domains ratherthan use a 1-1 relationship to define and associate a single set ofproperties with a single domain.

Auxiliary variables of an embodiment may be defined by letting V1, V2, .. . , Vn be a number of variables, which are all defined on some domain.The auxiliary variables can be further defined by letting E(V1, V2, . .. , Vn) be a function of these variables (an expression). Then anauxiliary variable W can be defined in the following way: W=E(V1, V2, .. . , Vn).

An embodiment may define glued variables using a number of disjointdomains that are numbered 1, 2, . . . , n. The glued variables can befurther defined by letting V1, V2, . . . , Vn be a number of variables,where Vk is defined on domain number k. Then a glued variable W can bedefined on the union of the domains in the following way: W=Vk on domaink, for all k.

An embodiment may define the mapped variables by letting F be a mappingfrom a destination domain to a source domain. The mapped variables canbe further defined letting V be a variable defined on the source domain.Then a mapped variable W can be defined on the destination domain byW=V(F).

An embodiment of the integrated variables can be defined by letting V bea variable defined on a d-dimensional domain M in some d-dimensionalEuclidean space. The integrated variables can be further defined byletting b<d, and letting P be the projection onto a b-dimensionalEuclidean space defined by P(p,y)=p, where p and y are b-tuples and(d-b)-tuples of real numbers, respectively. Here we consider (p,y) as apoint in the d-dimensional space. Further assume that the projection ofM, P(M), is a domain. Then an integrated variable W can be defined onP(M) in the following way: for each point p in P(M), the value W(p) isdefined as the integral of V over the subset of M that is projected ontop by P.

The plurality of variables, as described above, can be combined into anyone or more of a plurality of permutations to form other variables. Forexample, integration along curved domains can be implemented bycombining mapped variables and integrated variables. However, it may beclearer if the steps are separated, as described above. In anembodiment, some examples of these combinations of the above variablestypes, can include Expression variables, Boundary coupled variables,Scalar coupling variables, Extrusion coupling variables and Projectioncoupling variables, which are each described in detail below.

An embodiment may define Expression variables using a number of disjointdomains that are numbered 1, 2, . . . , n. Let E1, E2, . . . , En be anumber of expressions, where Ek is defined on domain number k. Then anexpression variable W can be defined on the union of the domains in thefollowing way: W=Ek on domain k, for all k. In this instance, theexpression variable can be represented as a glued variable, where thevariables that are glued together are auxiliary variables. This is doneby introducing names V1, . . . , Vn for the expressions E1, . . . , En.The expression variables are defined in the fields xfem.fem{g}.***.expr,where *** is equ, bnd, edg, or pnt, and g is the geometry number. Theexpr field is a list of alternating variable names and definingexpressions. A defining expression can be substituted with a list ofexpressions, where the nth expression applies to the nth domain group.

An embodiment may define Scalar coupling variables by defining newvariables as expressions of variables, which are evaluated somewhereelse. The variable is defined as the integral of an expression over somedomains. Such a variable can be defined by the following data that maybe included in a data structure and associated fields in an embodiment:

c.elem=elcplscalar;

c.src.g= . . . ;

c.src.equ.var . . . ;

c.src.equ.ind= . . . ;

c.src.bnd.var= . . . ;

c.src.bnd.ind= . . . ;

c.src.edg.var= . . . ;

c.src.edg.ind . . . ;

c.src.pnt.var= . . . ;

c.src.pnt.ind . . . ;

c.dst.g= . . . ;

c.dst.edg.ind= . . . ;

c.dst.bnd.ind= . . . ;

c.dst.edg.ind . . . ;

c.dst.pnt.ind= . . . ;

xfem.elemcpl{iel} c;

What will now be described are the data fields set forth above. Theabove described data creates a scalar coupling variable elementstructure c with index iel with the field c.elem above. The src fielddefines the new scalar variables in terms of integrals of expressionsover geometry src.g (which defaults to 1). Src.equ.var defines variablesin terms of integrals over subdomains. Further, src.equ.var is a cellvector with alternating variable names and expressions. The expressionscan be numeric constants, strings or cell vector of such. If theexpression is a cell vector, then its nth component applies to the nthsubdomain group. The subdomain groups are defined by the src.equ.indfield. The default subdomain grouping is that all subdomains are in onegroup. The variable is defined to have the value obtained by integratingthe expression over the subdomain groups. If required, a fieldsrc.gporder or src.equ.gporder can be given to specify the order of thequadrature formula to use in numerical integration as described, forexample, in Cook, R. D., Malkus, D. S., & Plesha, M. E., Concepts andApplications of Finite Element Analysis, Wiley, 1988 and Zienkiewicz, O.C. & Taylor, R. L., The Finite Element Method, vol. 1, McGraw-Hill,1994. The order should be a positive integer, and, in one embodiment,the default is 2.

Similarly, src.bnd, src.edg, and src.pnt define scalar variables asintegrals over boundaries, edges, and vertices, respectively an integralover a vertex is just the value of the integrand at the vertex). Bydefault, the variables defined in src can be used everywhere in ageometry under analysis. The optional field dst can be used to specifythe domains of definition for the variables in detail. Dst.g specifiesthe geometry number on which the variables are defined (defaults to 1).The dst.***.ind fields specify on which domains the variables aredefined.

A variable defined, as described above, may be referred to as a scalarcoupling variable. Such a variable can be seen as a combination, forexample, of an expression variable, an integrated variable and a mappedvariable, as follows. The expressions in src.***.var define anexpression variable. The expression variable may be integrated over itsdomain of definition, producing an integrated variable that is definedon a zero-dimensional space. The integrated variable may be furthermapped to the destination domain using the mapping F that sends allpoints to the point in the zero-dimensional space.

An embodiment may define Extrusion coupling variables by defining newvariables as expressions of variables evaluated somewhere else. TheExtrusion coupling variables are defined in a source domain and used ina destination domain. The value of the variable at an evaluation pointin the destination domain is found by evaluating an expression at apoint in the source domain, where the choice of point in the sourcedomain is dependent on the position of the evaluation point in thedestination domain.

An extrusion coupling variable can be defined by the following datafields as may be included in a data structure in an embodiment:

c.elem=elcplextr;

c.src.g= . . . ;

c.src.equ.var= . . . ;

c.src.equ.ind= . . . ;

c.src.bnd.var= . . . ;

c.src.bnd.ind= . . . ;

c.src.edg.var= . . . ;

c.src.edgind . . . ;

c.src.pnt.var= . . . ;

c.src.pnt.ind= . . . ,

c.src.meshp= . . . ;

c.dst.g= . . . ;

c.dst.equ.ind= . . . ;

c.dst.bnd.ind= . . . ;

c.dst.edg.ind= . . . ;

c.dst.pnt.ind= . . . ;

c.dst.ep= . . . ;

xfem.elemcpl{iel}=c;

The foregoing fields will now be described in more detail. The abovedescribed data creates an extrusion coupling variable element structurec with index iel with c.elem above. The extrusion coupling variables aresimilar to scalar coupling variables in that the basic fields in dst andsrc of the element structure are the same. That is to say, that dstdefines the geometry and domains, where the variables are available, andsrc defines the variable names and associated expressions, and thegeometry and domains from which they are defined. For extrusion couplingvariables, the main difference is that src has a new field meshp, anddst has a new field ep. These describe the way in which an evaluationpoint in the destination domain is associated with a point in the sourcedomain.

The src field defines the new variables in terms of expressions ongeometry src.g (which defaults to 1). Src.equ.var defines variables interms of expressions on subdomains. Further, src.equ.var is a cellvector with alternating variable names and expressions. The expressionscan be numeric constants, strings or cell vector of such. If it is acell vector, then its nth component applies to the nth subdomain group.The subdomain groups are defined by the src.equ.ind field, and it hasthe usual syntax. The default subdomain grouping is that all subdomainsare in one group. Similarly, src.bnd, src.edg, and src.pnt definevariables in terms of expressions on boundaries, edges, and vertices,respectively. In addition, the term dst.g specifies the geometry numberon which the variables are defined (defaults to 1). The dst.***.indfields specify on which domains the variables are defined.

The expressions in src.***.var may be used to define a number ofvariables, in the same way as expression variables are defined, in whichthe variables are defined in the source domain. Consider a variable, v1.What will now be described is how the values of the variable v1 aretransferred to the destination domain, thus defining the variable w1 inthe destination domain. The field src.meshp as described in more detailelsewhere herein is a cell vector of expressions, one for each spacedimension in the source domain. These expressions define the componentsof a mapping Fs, which maps the source domain into an auxiliaryEuclidean space of the same dimension. It is assumed that the inverse ofthis mapping, Fsi, exists. The inverse Fsi can be computed by search inthe image of the source domain mesh under Fs (see Frey, P. J. & George,P.-L., Mesh Generation, application to finite elements, HERMES SciencePublishing, 2000, pp. 89-90) and linear interpolation, followed byNewton iteration. Similarly, the field dst.ep may be a cell vector ofexpressions, where the number of expressions is the same as thedimension of the auxiliary Euclidean space. These expressions define thecomponents of a mapping Fd, which maps the destination domain into theauxiliary space. Now the variable w1 is defined on the destinationdomain by the formula w1(p)=v1(Fsi(Fd(p))), where p denotes points inthe destination domain. The variable w1 may be referred to as anextrusion coupling variable. Based on the foregoing, w1 may be obtainedas a combination of an expression variable and mapped variables. Namely,first the expression variable v1 is created. Then v1 is mapped to theauxiliary space using the mapping Fsi resulting in a mapped variable inthe auxiliary space. Then this is further mapped to the destinationdomain using the mapping Fd producing a mapped variable, such as w1.

In an embodiment, Projection coupling variables may be defined as lineintegrals of expressions evaluated somewhere else. The variables aredefined in a source domain and used in a destination domain. The valueof the variable at an evaluation point in the destination domain isfound by evaluating a line integral of an expression at in the sourcedomain, where the choice of line (curve) in the source domain isdependent on the position of the evaluation point in the destinationdomain.

A projection coupling variable may be defined using the following fieldsincluded in a data structure in an embodiment:

c.elem=elcplproj;

c.src.g= . . . ;

c.src.equ.var= . . . ;

c.src.equ.ind= . . . ;

c.src.bnd.var . . . ;

c.src.bnd.ind= . . . ;

c.src.meshp= . . . ;

c.dst.g= . . . ;

c.dst.equ.ind= . . . ;

c.dst.bnd.ind= . . . ;

c.dst.edg.ind=;

c.dst.pnt.ind= . . . ;

c.dst.ep= . . . ;

xfem.elemcpl{iel}=c;

The foregoing data fields will now be described in more detail. Theabove described data defines a projection coupling variable elementstructure c with index iel with c.elem as defined above. Projectioncoupling variables are similar to elcplscalar in that the fieldsincluded in dst and src of the element structure are the same. In otherwords, dst defines the geometry and domains where the variables areavailable, and src defines the variable names and associatedexpressions, and the geometry and domains from which they are defined.For projection coupling variables, the main difference is that src has anew field meshp, and dst has a new field ep. These describe the way inwhich an evaluation point in the destination domain is associated withpoints in the source domain. The fields meshp, and ep are similar toelcplextr, with a few small changes.

The src field defines the new variables in terms of expressions ongeometry src.g (which defaults to 1). Src.equ.var defines variables interms of expressions on subdomains. It is a cell vector with alternatingvariable names and expressions. The expressions can be numericconstants, strings or cell vector of such. If it is a cell vector, thenits nth component applies to the nth subdomain group. The subdomaingroups are defined by the src.equ.ind field, and it has the usualsyntax. The default subdomain grouping is that all subdomains are in onegroup. Similarly, src.bnd, src.edg, and src.pnt define variables interms of expressions on boundaries, edges, and vertices, respectively.

Dst.g specifies the geometry number on which the variables are defined(defaults to 1). The dst.***.ind fields specify on which domains thevariables are defined. They have the usual syntax.

The expressions in src.***.var may be used to define a number ofvariables, in the same way as expression variables are defined, in thesource domain. Consider one of these variables v1. What will now bedescribed is how the values of the variable v1 may be transferred to thedestination domain, thus defining the variable w1 in the destinationdomain. The field src.meshp is a cell vector of expressions, one foreach space dimension in the source domain and may be used in definingthe components of a mapping Fs, which maps the source domain into anauxiliary Euclidean space of the same dimension. It is assumed that theinverse of this mapping, Fsi, exists. The inverse Fsi may be computed bysearching in the image of the source domain mesh under Fs (see Frey, P.J, & George, P.-L., Mesh Generation, application to finite elements,HERMES Science Publishing, 2000, pp. 89-90) and linear interpolation,followed by Newton iteration. A temporary variable, v2, may be definedin the auxiliary space by the formula v2(p)=v1(Fsi(p)), where p denotespoints in the auxiliary space. The field dst.ep may be a cell vector ofexpressions, where the number of expressions is one less than thedimension of the auxiliary Euclidean space in which the expressionsdefine the components of a mapping Fd, which maps the destination domaininto a subspace of the auxiliary space. This subspace is defined as thesubspace in which the last coordinate is zero. Define a further variablev3 on this subspace as the integrated variable obtained from v2 byintegration along lines orthogonal to the subspace. Finally, thevariable w1 is defined on the destination domain by the formulaw1(p)=v2(Fd(p)), where p denotes points in the destination domain. Basedon the foregoing, the variable w1 may be referred to as a projectioncoupling variable. Also based on the foregoing, w1 may be obtained as acombination of an expression variable (v1), a mapped variable (v2), anintegrated variable (v3), and a mapped variable (w1).

An embodiment can define Boundary coupled variables on boundaries in thefollowing manner. Given is an expression E defined on a subdomain. Thena Boundary coupled variable W can be defined by W=E on a boundary thattouches this subdomain. Thus a Boundary coupled variable is a specialcase of a mapped variable (of an auxiliary variable), where the mappingF is the identity mapping from a boundary into an adjacent subdomain.Optionally, one can start with two expressions Eu and Ed that aredefined on the two adjacent subdomains to a boundary, respectively. Thena Boundary coupled variable W can be defined on the boundary asW=(Eu+Ed)/2. In this case, W is the mean value of two mapped variables.The data structure that defines Boundary coupled variables can have theform

c.elem=elcplbnd; /** this represents the boundary coupled variable typeof structure */

c.g=g;

c.bnd.vara=varu;

c.bnd.vard=yard;

c.bnd.varm=varm;

c.bnd.ind−ind;

xfem.elemcpl{i}=c;

where the foregoing fields are described in following paragraphs. Theabove creates a boundary coupled variable element structure c with indexi. The variable definitions given by varu, yard, and varm will be activeonly in geometry number g. If the ind field is given, the definitionswill apply only in the specified boundary groups. Varu, yard, and varmare cell vectors

{varname1 expr1 varname2 expr2 . . . }

with alternating variable names and defining expressions. Theexpressions can be numerical constants, strings, or cell vectors ofnumerical constants and strings. In the case of a cell vector, its nthcomponent applies to the nth group of boundaries given by ind (dm indfield is not given, the first entry of the cell vector applies to allboundaries). Otherwise, the expression applies to all boundary groups.

For varu and yard, the value of the variable is the expression evaluatedin the upper/lower subdomain, or zero if there is no upper/lowersubdomain. For varm, the value is the mean of the upper and lower valueson an inner boundary, the adjoining value on an outer boundary, and NaNif there is no subdomain on either side.

An embodiment of the method may further include a scheme for numericalcomputation of the values of a variable in accordance with each type asone of a basic variable, an auxiliary variable, a glued variable, amapped variable, and an integrated variable. For example, assume that auser wants to compute the values of the variable Win the points p1, p2,. . . , pm, given values Ui for the DOFs. The points pj are specified bygiving the values of the local coordinates, and the mesh elements inwhich they reside. The result can be represented as a row vector, wherethe jth component is W(pj). Depending on what type of variable W is,there are five possible cases, e.g., W is a basic variable, W is anauxiliary variable, W is a glued variable, W is a mapped variable and Wis an integrated variable, which are described in detail below. If W isa basic variable, its values can be computed directly. If W is any ofthe other types of variables, the values of the variables occurring inthe definition of W should first be computed. Thus, a recursive schemeis set forth for computation of the values.

In the case where W is a basic variable, as described above, W is thesum of Ui*Fi over all indices i. Values are given by W(pj)=sum ofUi*Fi(pj) over all i. Since pj is given in local coordinates, and Fi isa polynomial, it is easy and well known how to evaluate Fi(pj).

In the case where W is an auxiliary variable, W=E(V1, V2, . . . ,Vn), asdescribed above, the values of the variables V1, V2, . . . , Vn in thepoints pj are determined. The values of W may then be computed asW(pj)=E(V1(pj), V2(pj), . . . , Vn(pj)), by evaluating this expression.Note: if the expressions are parsed on the fly, it is wise to carry outthe evaluation on a large set of points in parallel, in order to savecomputation time.

In the case where W is a glued variable, W(pj)=Vk(pj) for those pointspj, which are in domain k, as described above. For each k, let thevector Ik contain the indices j of the points pj that lie in domain k.First compute the values of the variables V1, V2, . . . , Vn. In otherwords, compute the values of the variable Vk in the points pj, where jis in Ik. Subsequently, define W(pj)=Vk(pj) for j in Ik.

In the case where W is a mapped variable, W(pj)=V(qj), where qj are thepoints qj=F(pj), as described above. These points are computed in thefollowing way: First, the global coordinates for the points pj arecomputed, and the global coordinates for the points qj are computed bythe formula qj=F(pj). Then, a search algorithm may be used to find themesh elements in which the points qj reside in, and the correspondinglocal coordinates. Such search algorithms are known to those of ordinaryskill in the art, for example, at pages 89-90 of “Mesh GenerationApplication to Finite Elements” by Frey et al. also referenced elsewhereherein. Subsequently, the variable V is computed in the points qj. Theresult is identical with the requested values, namely the values of W inthe points pj.

In the case where W is an integrated variable, W(pj) is the integral ofV(pj,y) over all y such that (pj,y) lies in the domain of V, asdescribed elsewhere herein. This integral is approximated with aquadrature formula in the standard way, i.e., W(pj) is approximated withthe sum of V(pj,yjk)*wjk over some indices k (the index set can dependon j), see for example, Zienkiewicz, O. C. & Taylor, R. L., The FiniteElement Method, vol. 1, McGraw-Hill, 1994. The numbers wjk are calledthe weights. Let q1, q2, . . . be the points (pj,yjk) in some order, andlet w1, w2, . . . be the corresponding ordering of the weights wjk.Create the index vector J in the following way: J(1) is the index j forwhich q1=(pj,yjk) (for some k). Thus J maps from indices of the pointsq1, q2, . . . to indices of the projected points pj. Now compute thevalues of the variable V in the points q1, q2, . . . . The result isrepresented by a row vector R. The values for the variable W can be nowbe computed as follows. W(pj)=sum of R(1)*w(1), where the sum is takenover all 1 such that J(1)=j.

An embodiment may also include a format for numerical representation ofthe Jacobian of a variable. The Jacobian of a variable V may be definedas the vector consisting of the first partial derivatives of V withrespect to the DOFs, denoted as a vector U=[U1, . . . Un] where n is thenumber of DOFs. The partial derivative of V with respect to Ui isdenoted DiV. Assume that we want to evaluate the Jacobian of V in anumber of points p1, p2, . . . , pm. The Jacobian of V in these pointscan be represented by a number of contributions J1, J2. The number ofcontributions used in computing the Jacobian of a variable may vary inaccordance with each variable's type and complexity. It should be notedthat in the following description, the references to VAL, DOF and EP arevariables used and referenced elsewhere herein in processing steps whencomputing the Jacobian. Each contribution Jk consists of three things: Amatrix Jk.VAL, a matrix Jk.DOF, and a row vector Jk.EP. For a fixedindex k, the matrices Jk.VAL and Jk.DOF have the same size, and theyhave the same number of columns as Jk.EP. The DOF matrix contains degreeof freedom indices, and the VAL matrix contains the correspondingcontributions to the value of the partial derivative. The EP vectorcontains evaluation point indices. More precisely, this means that thepartial derivative DiV(pj) is equal to the sum of Jk.VAL(r,c), where thesum is taken over all k, r, and c such that Jk.DOF(r,c)=i and Jk.EP(c),j. Note that r and c denote the row and column indices, respectively, inthe matrices. Often, the vector Jk.EP is [1 2 . . . m]. In order toconserve memory space, the EP vector can be omitted in this case.

It should be noted that the Jacobian of a variable with respect to thedegrees of freedom should not be confused with the stiffness matrixdescribed elsewhere herein in which the stiffness matrix is the Jacobianmatrix of the residual with respect to the degrees of freedom.

The points p1, p2, . . . , pm may be uniformly distributed in the meshelements. In other words, the first b points lie in the first meshelement, the next b points lie in the second mesh element, etc. In thiscase, the local coordinates may also be the same in all mesh elements.This type of local point data may be referred to as structured pointdata, and the general case is called unstructured point data. For abasic variable, structured point data means that the matrices Jk.DOF canbe compressed. Namely, the first b columns of Jk.DOF are identical, thenext b columns of Jk.DOF are identical, etc. A more compact format canbe realized by keeping only every bth column of Jk.DOF. This compactformat can be preserved as long as only basic variables, auxiliaryvariables, and glued variables are used. In using “structured” data,element coordinates for the evaluation points are the same for all meshelements. With unstructured point data, element coordinates arespecified for each evaluation point individually.

Additionally, an embodiment may also include a scheme for a numericalcomputation of the Jacobian of a variable. Assume that it is desired tocompute the Jacobian of a variable W in the points p1, p2, . . . , pm,given values for the DOFs Ui. The points pj are specified by giving thevalues of the local coordinates, and the mesh elements in which theyreside. The result can be represented in the format described above.Depending on what type of variable W is, there are five possible cases,e.g. W is a basic variable, W is an auxiliary variable, W is a gluedvariable, W is a mapped variable or W is an integrated variable, whichare discussed in detail below. If W is a basic variable, the Jacobiancan be computed directly. If W is any of the other types of variables,the Jacobians of the variables occurring in the definition of W mustfirst be computed. Thus, a recursive scheme is set forth for computationof the Jacobian.

In the case where W is a basic variable, recall that W is the sum ofUi*Fi over all indices i. Thus, the partial derivatives areDiV(pj)=Fi(pj). The Jacobian can represented with just one contributionJ1. The vector J1.EP may be represented as a vector [1 2 3 . . . m].Consider the mesh element in which the point pj lies. Only a few basisfunctions are nonzero on this mesh element. The indices i of these basisfunctions constitute the jth column of the matrix J1.D0F. Thecorresponding values Fi(pj) make up the jth column of the matrix J1.VAL.Since pj is given in local coordinates, and Fi is a polynomial, it iseasy and well known how to evaluate Fi(pj).

In the case where W is an auxiliary variable, recall that W=E(V1, V2, .. . ,Vn). By the chain rule,

${D_{1}{W\left( p_{j} \right)}} = {\sum\limits_{k}\; {\frac{\partial E}{\partial V_{k}}\left( p_{j} \right)D_{i}{{V_{k}\left( p_{j} \right)}.}}}$

First compute the Jacobians of the variables Vk, k=1, 2, . . . , n.These are represented by the contributions Jkl, for each variable “k”having one or more “1” contributions (where the index 1 can run overdifferent sets for the different k). Compute the partial derivatives ofE symbolically, for example, as described in Davenport, J. H., Siret, Y.& Tournier, E., Computer Algebra, systems and algorithms for algebraiccomputation, Academic Press, 1993, and evaluate the partial derivativesin the points pj, using the algorithm described above. Store the resultin the vectors Ck:

${C_{k}(j)} = {\frac{\partial E}{\partial V_{k}}\left( p_{j} \right)}$

Now the Jacobian of W can be represented by the contributions Kkl, whichare computed as follows. The EP and DOF matrices are the same as for thevariables Vk: Kkl.EP=Jkl.EP and Kkl.DOF=Jkl.DOF. The VAL matrices arecomputed as follows: Kkl.VAL(r,c)=Ck(Jkl.EP(c))*Jkl.VAL(r,c). Thecalculated contributions Kkl should then be reindexed in terms of justone index.

In the case where W is a glued variable, recall that W(pj)=Vk(pj) forthose points pj which are in domain k. For each k, let the vector Ikcontain the indices j of the points pj that lie in domain k. Firstcompute the Jacobians of the variables V1, V2, . . . , Vn. Moreprecisely, compute the Jacobian of the variable Vk in the points pj,where j is in Ik. This Jacobian is represented by the contributions Jkl(where the index 1 can run over different sets for the different k). Nowthe Jacobian of W can be represented by the contributions Kkl, which arecomputed as follows. The VAL and DOF matrices are unchanged:Kkl.VAL=Jkl.VAL and Kkl.DOF=Jkl.DOF. Kkl.EP is obtained from Jkl.EP byKkl.EP=Ik(Jkl.EP). The calculated contributions Kkl should then bereindexed in terms of just one index.

In the case where W is a mapped variable, recall that W(pj)=V(F(pj)).Thus, the partial derivatives are DiW(pj)=DiV(qj), where qj are thepoints qj=F(pj). These points are computed in the following way: first,the global coordinates for the points pj are computed, and the globalcoordinates for the points qj are computed by the formula qj=F(pj).Then, a search algorithm is used to find the mesh elements in which thepoints qj reside in, and the corresponding local coordinates. Now theJacobian of the variable V can be computed in the points qj. The resultis identical with the requested Jacobian, namely the Jacobian of W inthe points pj.

In the case where W is an integrated variable, recall that W(pj) is theintegral of V(pj,y) over all y such that (pj,y) lies in the domain of V.This integral is approximated with a quadrature formula in the standardway, i.e., we approximate W(pj) with the sum of V(pj,yjk)*wjk over someindices k (the index set can depend on j). Thus, the partial derivativeDiW(pj) can be obtained as the sum of DiV(pj,yjk)*wjk over k. Let q1,q2, . . . be the points (pj,yjk) in some order, and let w1, w2, be thecorresponding ordering of the weights wjk. Create the index vector J inthe following way: J(1) is the index j for which q1=(pj,yjk) (for somek). Thus, J maps from indexes of the points q1, q2, . . . to indices ofthe projected points pj. Now the Jacobian for the variable V can becomputed in the points q1, q2, . . . . The result is represented by thecontributions Jk. The Jacobian for the variable W can be represented bythe contributions Kk, which are computed as follows. The DOF matricesare unchanged, Kk.DOF=Jk.DOF. The VAL matrices are transformed accordingto Kk.VAL(r,c)=Jk.VAL(r,c)*wc. The new EP vectors are constructed byKk.EP(c)=J(Jk.EP(c)).

An embodiment may also provide an optimization using a cache, forexample, when using the above recursive algorithms for computing valuesand Jacobians of variables, it often happens that one computes the samevariable several times at different levels of the recursion tree. Tosave computing time, the results of the evaluations may be stored in thecache data structure for later use. In the cache, each result is storedtogether with a key, which identifies which variable was evaluated, andwhether it was values or the Jacobian that was computed. To search amongthe keys, hashing can be used. It is important also to keep track of theevaluation points. Each time one switches from one set of evaluationpoints to another set, one must make sure that either the cache iscleared, or, that the cache is pushed. In the latter case the cacheworks as a stack where each level corresponds to a set of evaluationpoints. When a user is done with one set of evaluation points, the usercan return to the previous set by popping the cache.

An embodiment may further include assembling the residual vector of aweak equation. For example, consider a weak term, that is, an expressionof the type V_test*W, where V and W are variables. The residual vector Lcorresponding to the weak term is a column vector defined byL(r)=integral of DrV*W over some domain, where we have assumed somegiven values of the DOFs Ui. To compute the residual vector numerically,we approximate this integral with a quadrature formula: L(r)=sum ofDrV(pj)*W(pj)*wj over certain indices j=1, 2, . . . , m. Thus, themethod may begin by computing the Jacobian of V and the values of W inthe points pj using the above methods. Assume that the Jacobian of V inthe points pj is represented by the contributions Jk. For simplicity,assume that the variable V is constructed from basic variables, onlyusing auxiliary variables. Thus, the contributions Jk all have Jk.EP=[12 . . . m]. Compute the row vector C as C(j)=W(pj)*wj. Now the residualvector L can be computed as follows: start with L as the zero vector.Loop over all k, then over all columns j of Jk.DOF, and then over allrows r of Jk.DOF, and add Jk.VAL(r,j)*C(j) to L(Jk.DOF(r,j)).

It should be noted that a weak term can in general have the formV_test*E(V1, V2, . . . , Vn). To simplify the presentation, a name W canbe introduced for the expression E(V1, V2, . . . , Vn), which ispossible by using an auxiliary variable. V_test is described elsewhereherein in more detail.

A weak expression may be defined as a sum of weak terms. A weak equationis obtained by summing a number of integrals of weak expressions, andputting the result equal to zero. FIG. 41 shows the weak formulation.The integrals can be taken over different domains. Partial differentialequations can be reformulated as weak equations.

FIG. 42 describes the conversion from a general form problem to a weakform. A weak equation is the starting point for the finite elementmethod. Therefore, it is important to be able to compute the residualvector corresponding to a weak equation. The residual vector can beobtained as the sum of the residual vectors of the underlying weakterms. The stiffness matrix corresponding to a weak equation is theJacobian of its residual vector. Therefore, the stiffness matrix can becomputed as the sum of the stiffness matrices of the underlying weakterms. Computation of the stiffness matrix is discussed in furtherdetail below.

An embodiment may further include assembling the stiffness matrix of aweak equation. For example, consider a weak term, that is, an expressionof the type V_test*W, where V and W are variables. The stiffness matrixS corresponding to the weak feint is defined by S(r,c)=integral ofDrV*DcW over some domain. To compute the stiffness matrix numerically,an approximation is made of this integral with a quadrature formula:S(r,c)=sum of DrV(pj)*DcW(pj)*w(j) over certain indices j=1, 2, . . . ,m. Thus, the method of assembling the stiffness matrix of a weakequation is commenced by computing the Jacobians of V and W using theabove method. Assume that these Jacobians are represented by thecontributions Jl and Kk, respectively. For simplicity, assume that thevariable V is constructed from basic variables, only using auxiliaryvariables. Thus, the contributions Jl all have J1.EP=[1 2 . . . m]. Nowform the matrices COLk, ROWlk, and the three-dimensional arrays VALlk asfollows. Put COLk=Kk.DOF and ROWlk(r,c)=J1.DOF(r,Jk.EP(c)). The arrayVALlk is defined byVALlk(r,c,s)=J1.VAL(r,Jk.EP(s))*Kk.VAL(c,s)*w(Jk.EP(s)). Now the arraysCOLk, ROWlk, and VALlk constitute a kind of sparse matrix representationof S. More precisely, S(r,c)=sum of VALlk(i,j,s), where the sum is takenover all l, k, s, i, and j such that r=ROWlk(i,s) and c=COLk(j,s).

An embodiment may further include assembling the constraints of a weakequation. For example, consider a constraint W=0 on some domain, where Wis a variable. The constraint is discretized by requiring that W=0 holdsin a finite number of points pj, j=1, 2, . . . , m. Often, the points pjare uniformly distributed in each mesh element on the domain. Theconstraint residual vector M is defined as the column vector with thecomponents Mj=W(pj). This vector can be computed with the method forevaluating the variable W described above.

The constraint matrix C is the Jacobian of M with respect to the degreesof freedom, namely, Cji=DiMj=DiW(pj). The constraint matrix C can becomputed by computing the Jacobian of W in the points pj using themethod described above. The result is a list of contributions Jk. Nowthe partial derivative DiW(pj) can be computed as the sum ofJk.VAL(r,c), where the sum is taken over all k, r, and c such thatJk.DOF(r,c)=i and Jk.EP(c), j.

In understanding the assembly and solution process, it is helpful tounderstand how the discretization of a stationary PDE problem is formed.The starting point is the weak formulation of the problem in FIG. 41 andthen with the discretization of the constraints:

0=R⁽²⁾ on Ω.

0=R⁽¹⁾ on B

0=R⁽⁰⁾ on P

The constraints on subdomains, boundaries, and vertices are stored inthe sub-fields equ.constr, bnd.constr, and pnt.constr, respectively, ofxfemlem{g}. Consider the constraints on boundaries B. For each meshelement in B (i.e., mesh edge in B), consider the Lagrange points ofsome order k (i.e., the points whose local coordinates are a multiple of1/k). Denote them by x(1)mj, where m is the index of the mesh element.Then the discretization of the constraint is

0=R⁽¹⁾(x^((l)) _(mj))

-   -   that is, the constraints are required to hold point-wise, at the        Lagrange points. The Lagrange point order k can be chosen        different for different components of the constraint vector        R⁽¹⁾, and it can also vary in space (this is determined by the        field xfem.fem{g}.bnd.cporder). The k is denoted by cporder that        may be included in a data structure described elsewhere herein.        The constraints on subdomains W and points P are discretized        similarly (nothing needs to be done with the points P). We can        collect all these point-wise constraints in one equation 0=M,        where M is the vector consisting of all the right-hand sides.

The dependent variables are approximated with functions in the chosenfinite element space(s). This means that the dependent variables areexpressed in terms of the degrees of freedom as

$\mu_{1} = {\sum\limits_{i}\; {U_{i}\phi_{i}^{(1)}}}$

where phi₁ ⁽¹⁾ are the basis functions for variable u₁. Let U be thevector with the degrees of freedom U_(i) as the components. This vectoris called the solution vector, since it is what is to be computed. Now Monly depends on U, so the constraints can be written 0=M(U). Nowconsider the weak equation:

$0 = {{\int_{\Omega}{W^{(2)}\ {A}}} + {\int_{B}{W^{(1)}\ {s}}} + {\sum\limits_{P}\; W^{(0)}} - {\int_{\Omega}{{v \cdot h^{{(2)}^{\Gamma}}}\mu^{(2)}\ {A}}} - {\int_{B}{{v \cdot h^{{(1)}^{\Gamma}}}\ \mu^{(1)}{s}}} - {\sum\limits_{P}\; {{v \cdot h^{{(0)}^{\Gamma}}}\ \mu^{(0)}}}}$

The integrands W(2), W(1), and W(0) are stored in the subfieldsequ.weak, bnd.weak, and pnt.weak, respectively, of xfem.fem{g}. Theintegrands W(2), W(1), and W(0) are weak expressions. To discretize thisequation, we express the dependent variables in terms of the DOFs asabove. Similarly, the test functions are approximated with the samefinite elements (this is the Galerkin method):

$v_{l} = {\sum\limits_{i}\; {V_{i}\phi_{i}^{(1)}}}$

Since the test functions occur linearly in the integrands of the weakequation, it is enough to require that the weak equation holds when wechoose the test functions as basis functions:

v _(l)=φ_(i) ^((l))

When substituted into the weak equation, this gives one equation foreach i. Now the Lagrange multipliers have to be discretized. Let

Λ_(mj) ^((d))=μ^((d))(χ_(mj) ^((d)))w _(mj) ^((d))

where x(d)mj are the Lagrange points define above, and w(d)mj arecertain weights, see below. The term

∫_(B)ϕ_(i) ⋅ h^((1)^(Γ)) μ⁽¹⁾s

is approximated as a sum over all mesh elements in B. The contributionfrom mesh element number m to this sum is approximated with the Riemannsum

${\sum\limits_{j}\; {{{\phi_{i}\left( x_{mj}^{(1)} \right)} \cdot {h^{{(1)}T}\left( x_{mj}^{(1)} \right)}}{\mu^{(1)}\left( x_{mj}^{(1)} \right)}w_{mj}^{(1)}}} = {\sum\limits_{j}\; {{{\phi_{i}\left( x_{mj}^{(1)} \right)} \cdot {h^{{(1)}T}\left( x_{mj}^{(1)} \right)}}\Lambda_{mj}^{(1)}}}$

where w(1)mj is the length (or integral of ds) over the appropriate partof the mesh element. The integral over W and the sum over P isapproximated similarly.

All this means that the discretization of the weak equation can bewritten

0=L−N ^(Y)Λ

L is the vector whose ith component is

${\int_{\Omega}{W^{(2)}\ {A}}} + {\int_{B}{W^{(1)}\ {s}}} + {\sum\limits_{P}\; W^{(0)}}$

-   -   evaluated for v1,=phi(1)i. LAMBDA is the vector containing all        the discretized. Lagrange multipliers LAMBDA(d)mj. N is a matrix        whose ith column is a concatenation of the vectors

h ^((d))(x _(mj) ^((d))φ_(i)(x _(mj) ^((d)))

To sum up, the discretization of the stationary problem is

0=L(U)−N(U)^(T)Λ

0=M(U)

The objective is to solve this system for the solution vector U and theLagrange multiplier vector LAMBDA. L is called the residual vector, M isthe constraint residual vector and C=−N is the constraint matrix. Notethat M is redundant in the sense that some point wise constraints occurseveral times. Similarly, L is redundant. This redundancy is removed bythe solvers. The solution of the discrete system is obtained by usingNewton's iterative method, i.e. by solving a number of linearizedproblems (see below).

The integrals occurring in the components of the residual vector L (aswell as the stiffness matrix S) are computed approximately using aquadrature formula. Such a formula computes the integral over a meshelement by taking a weighted sum of the integrand evaluated in a finitenumber of points in the mesh element. The order of a quadrature formulais the maximum number k such that it integrates all polynomials ofdegree k exactly. Thus, the accuracy of the quadrature increases withthe order. On the other hand, the number of evaluation points alsoincreases with the order. As a rule of thumb one can take the order tobe twice the order of the finite element that is used. The order of thequadrature formula is denoted by gporder in the data structures (gpstands for Gauss points).

In time-dependent problems, the discretization of a time-dependentproblem is similar to the stationary problem:

${{D\left( {U,t} \right)}\frac{U}{t}} = {{L\left( {U,t} \right)} - {{N\left( {U,t} \right)}^{T}\Lambda}}$0 = M(U, t)

where now U and LAMBDA depend on time t. The matrix D is called the massmatrix. This matrix is assembled in a similar way as the stiffnessmatrix, but from data in the fields xfem.fem{g}.***.dweak instead ofxfem.fem{g}.***.weak. It is assumed that the constraint is linear, i.e.,M depends linearly on U. The solution of the above system ofdifferential-algebraic equations can be obtained by using standardDAE-solvers.

In considering a linearized stationary problem, the linearization“point” corresponds to a solution vector U₀. The discretization of thelinearized problem is)

K(U ₀)(U−U ₀)+N(U ₀)^(T) Λ=L(U ₀)

N(U ₀)(U−U ₀)=M(U ₀)

where S=−K is called the stiffness matrix. The solution of this linearsystem can be obtained by standard direct or iterative methods.

In Eigenvalue problems, the discretization of the eigenvalue problem is

−λD(U ₀)U+K(U ₀)U+N(U ₀)^(T)Λ=0

N(U ₀)U=0

where U₀ is the solution vector corresponding to the linearization“point”. The solution to this eigenproblem can be obtained by standardmethods.

Referring now to FIG. 36, shown is an example of another embodiment of auser interface or GUI 600 that may be used in connection with specifyinglocal and non-local couplings of multiphysics systems. The GUI 600 issimilar in features and operation as the GUI 30 of FIG. 3 and furtherincludes an option to add geometries, which is discussed in detailbelow. On the GUI 600, a user can start a multiphysics model thatconsists of several application modes and several different geometries.The user can start in the top left part of the GUI 600 by specifyingspace dimension (1-D, 2-D, or 3-D) and the user can elect to edit thenames of the independent variables in the Independent variables dialogbox 602. The user can also select application modes from the left-mostlist box 604 and add them to the model by pressing the >> button 606 orby double-clicking them. Application modes can be removed from the listby pressing << button 608 or double-clicking on them. When the lastapplication mode is removed from a geometry, the geometry is still leftin the right list box 610. This corresponds to a geometry only modelwhere you can draw a geometry and then add application modes later on.The user can also press the << button 608 once more to remove thegeometry. There is always one geometry available in the right list box610. A user can add additional geometries to the model by pressingthe >> button 612 a after selecting from the Geometry name drop-downlist box 614 (the Add button 612 changes to a >> button 612 a afterclicking it, and thus adds geometry to the Geometry name drop-down listbox 614). Each geometry can also have a different space dimension.

Prior to the user adding an application mode, as described above, theuser can edit the name of the application mode. Additionally, the usercan also edit the name of the application mode's dependent variables andthe element type used for modeling. Each application mode in the modelis given a unique name, which is used to identify the origin of thevariables in the multiphysics model. The user can edit the dependentvariables' names, but the names are required to be valid variable names(e.g., they are required to start with a letter). If the applicationmode contains more than one dependent variable, the user can enter allof the variable names as space-separated entries in the Dependentvariables edit field 616. In the PDE modes, where more than onedependent variable is possible, the user can determine the number ofequations in the model by entering one or more space-separated variablenames.

In the Element drop-down list box 618, the type of element used for themodeling is selected. Each application mode has a set of predefinedelements. The element selection of the Element drop-down list box 618can also be changed during the modeling process using the Element page802 in the Subdomain Settings dialog box 800 (FIG. 38).

On the right-hand side of the GUI 600 of FIG. 36, a user can set thesolver type (stationary, time-dependent, etc.) and solution form(coefficient, general, or weak form) for the multiphysics model byrespectively selecting a solver type from the solver type of drop-downlist 620 and selecting a solution from the Solution form drop-down list622. In the list box 610 located below the solution form drop-down list622, all the application modes that have been added to the model appear.The name and the dependent variables for the selected application modeare displayed below the list box 610. A user can select any of themodel's application modes and change its submode by selecting from theelements listed in the Submode drop down list 624. In addition to theStandard submode displayed in the Submode drop-down list 624 of the GUI600, for example, there is also a Wave-Extension submode (not shown) forsome application modes. The Wave-Extension submode extends the standardtime-dependent equation to a wave equation (using a second derivativewith respect to time). Pressing OK 626 starts a new multiphysics modelwith all the added application modes, as described above. Theapplication mode that is selected in the right list box 610 becomes theactive application mode when the user continues the modeling.

Referring to FIG. 37, shown is an example Boundary settings dialog box700 that provides a user the ability to access the weak form. In theBoundary settings dialog box 700, a user can enter weak, dweak, andconstr coefficient information in the respective weak 702, dweak 704,and constr 706 fields corresponding to the fields xfem.fem{g}.bnd.weak,xfem.fem{g}.bnd.dweak, and xfem.fem{g}.bnd.constr, respectively, in thedata structure. The dialog box also sets the domain groupingxfemlem{g}.bnd.ind. The Boundary settings dialog box 700 furtherincludes a Domain selection list 708 that permits a user to selectdomain related information associated with the weak solution form. TheBoundary settings dialog box 700 can also be made available incoefficient view, and also directly in the application mode, for PDEoriented application modes.

Referring to FIG. 38, shown is an example of a Subdomain Settings dialogbox 800, which enables a user thereof to set shape function object,integration order, and constraint order, corresponding to the fieldsxfem.fem{g}.equ.shape, xfem.fem {g}.equ.gporder, andxfemlem{g}.equ.cporder, respectively, in the data structure. The dialogbox also sets the domain grouping xfem.fem {g}.equind. The shapefunction object, integration order, and constraint order data structuresare defined below. In a typical application mode, the element type isonly set on a subdomain level, but can be modified in coefficient view,boundary level, edge level, and point level. It is possible that anapplication mode has no subdomain extent, and thus is defined only on aboundary level and/or below. Then, in one implementation, for example,the application mode can set element types on a boundary level and allowmodification of coefficient on edge level and point level.

Referring to FIG. 39, shown is another example of a Subdomain Settingsdialog box 900, which permits a user to enter weak, dweak, and constrcoefficient information for respective weak 902, dweak 904, and constr906 fields corresponding to the subfields of the xfem.fem{g} datastructure. The dialog box 900 may also be used to specify domaingroupings, for example, stored in the xfem.fem{g}.equind field. Thedialog box can be made available in coefficient view, and also directlyin the application mode, for PDE oriented application modes.

Referring to FIG. 40, shown is an example of a representation of thedata structure 1000 that may be included in an embodiment in connectionwith storing data in connection with the PDEs selected and combined. Thedata in the data structure 1000 may include data used in connection withthe multiphysics model, which is associated with local and/or non-localcoupling variables.

The data structure 1000 can include the following fields:

Data field Description fem.mesh Finite element mesh fem.appl {i}Application mode I fem.app1 {i}.dim Dependent variable name fem.appl { i} .equ Domain physical data fem.appl {i}.bnd Boundary physical datafern.appl {i}.submode Text string containing submode setting fem.appl{i} .border Border on or off fem.appl {i} .usage Matrix of subdomainusage fem.dim Multiphysics dependent variable names fem.equ PDEcoefficients fem.bnd Boundary conditions fem.border Vector of border onor off fem.init Initial value fem.sol Finite element solution fem.sshapeGeometry approximation order fem.shape Shape functions fem.exprDefinition of variables as expressions fem.equ Variables, equations,constraints, and initial values on subdomains fem.bnd Variables,equations, constraints, and initial values on boundaries fem.edgVariables, equations, constraints, and initial values on edges fem.pntVariables, equations, constraints, and initial values on vertices

As previously described, the data structure 1000 above can be extendedfor use with multiple geometries by storing the above data structure forgeometry g in a list entry xfem.fem{g}

The data structure 1000 is similarly constructed and arranged as thedata structure 250, as described above, and further includes theadditional fields: fem.sshape 280, fem.shape 282, fem.expr 284, fem.equ286, fem.bnd 288, fem.edg 290 and fem.pnt 292, as described above. Theglobal coordinates are polynomials in the local element coordinates of acertain degree k. This degree k can be specified in the field fem.sshape280. For instance, fem.sshape=2; uses quadratic shape functions for theglobal space coordinates. This makes it possible for the mesh elementsat the boundary to be curved, and thus come closer to the true geometricboundary. The default k is equal to the maximum order of the shapefunction objects in fem.shape 282, where k is called the geometry shapeorder. The field fem.shape 282 is a cell vector with shape functionobjects. For example, fem. shape={shlag(1, ‘u’) shlag(2, ‘u’)shvec(‘A’)}; defines three shape function objects. A user can choose onwhich domains these objects will be active, by using the fieldsfem.equ.shape, fem.bnd.shape, fem.edg.shape, fem.pnt.shape, as discussedin detail below.

In the fields fem.equ.shape, fem.bnd.shape, fem.edg.shape, andfem.pnt.shape, a user can specify where the shape function objects infem.shape are to be used. For example, fem.shape={shlag(1, ‘u’) shlag(2,‘u’) sharg_2_5 (‘v’)}; fem.equ.shape={[1 3] [2 3] [ ] 3}; means that onthe first subdomain group, only the first and third shape functionobjects (shlag(1, ‘u’) and sharg_2_5 (‘v’)) are active. On the secondsubdomain group, the second and third shape function objects are active.On the third subdomain group, no shape function objects are defined,while on the fourth subdomain group only sharg_25 (‘v’) is active. Thus,the variable u will be defined on subdomain groups 1 and 2, havinglinear elements in subdomain group 1, and quadratic elements insubdomain group 2. If these subdomains groups are adjacent, this willcause problems since “hanging nodes” can appear. Thus, the user shouldnot mix elements for the same variable in adjacent subdomains. If thefield fem.equ.shape is not given, then all shape function objects infem.shape 282 apply in all subdomain groups.

Similarly, the field fem.bnd.shape is a cell vector, which specifies foreach boundary group which shape function objects are active. Iffem.bnd.shape is not given, then it is inherited from fem.equ.shape.This means that a shape function object, which is active in a subdomain,is also active on the boundary of that subdomain (as well as boundarieslying within the subdomain).

In 3-D, the field fem.edg.shape similarly specifies the usage of shapefunction objects on edge groups. If the usage of shape function objectsis not given, it is inherited from the usage on subdomains andboundaries. That is, a shape function object which is active on somesubdomain or some boundary, is also active on all edges that touch thissubdomain or boundary. In 2-D and 3-D, the field fem.pnt.shape similarlyspecifies usage on vertices. Specifying usage on vertices is defaultedby inheritance from subdomain, boundaries, and edges.

The fields fem.usage and fem.border mentioned earlier can be implementedin terms of the fem.***.shape fields by not assigning a shape functionobject to a subdomain, boundary, edge or point. Thus with the fieldsfem.***.shape, the fields fem.border and fem.usage are no longernecessary.

The additional fields cporder, gporder, weak, dweak, constr, and exprare available in the fields fem.equ 286, fem.bnd 288, fem.edg 290, andfem.pnt 292. A user can define new field variables in terms of others inthe fields fem.expr 284, fem.equ.expr, fem.bnd.expr, fem.edg.expr, andfem.pnt.expr. This may provide an advantage if included in anembodiment, for example, in which an equation may include the sameexpression several times.

In the field fem.expr 284 a user can put variable definitions that applyon all domain groups (of all dimensions). The field fem.expr 284 is acell vector of alternating variable names and expressions. Infem.equ.expr a user can put variable definitions that are in force onsubdomains. For example, fem.equ.expr={‘W’ ‘B*H/2’ ‘div’ ‘ux+vy’};defines W=B*H/2, and div=ux+vy on all subdomain groups. The definingexpressions in the fem.equ.expr cell vector can be cell vectors, forinstance fem.equ.expr={‘v’ {‘a+b’ ‘a−b’} ‘w’ ‘pi*x*b’}. This defines vto be a+b on subdomain group 1, and a−b on subdomain group 2. The use ofan empty vector [ ] instead of an expression means that the variable isnot defined on the corresponding subdomain group. For example,fem.equ.expr={‘v’ {‘a+b’[ ]}}; means that v=a+b on subdomain group 1,and v is undefined on subdomain group 2. Similarly, variable definitionson boundaries, edges, and vertices are put in fem.bnd.expr,fem.edg.expr, and fem.pnt.expr, respectively.

The integrals occurring in the assembly of the matrices are computednumerically using a quadrature formula. The order of this quadratureformula is specified in the fields fem.equ.gporder, fem.bnd.gporder,fem.edg.gporder, and fem.pnt.gporder. The fem.***.gporder fields areentered in the dialog box of FIG. 38 for subdomains. There are similardialog boxes for boundaries, edges and points. The field fem.equ.gpordergives the order for integrals over subdomains. Fem.equ.gporder can be anumber or a cell vector. In the first case, fem.equ.gporder applies toall subdomain groups. In the second case, fem.equ.gporder{i} applies tothe ith subdomain group. Fem.equ.gporder{i} can be a number or a cellvector of numbers. In the latter case, fem.equ.gporder{i} {k} applies tothe kth equation in coefficient or general form, and the kth integrandfem.equ.weak{i} {k} in the weak formulation.

Similarly, fem.bnd.gporder, fem.edg.gporder, and fem.pnt.gporder givesthe order for integrals over boundaries, edges, and vertices,respectively. The default value of the gporder fields is twice themaximum order of the shape functions being used.

The pointwise constraints are enforced in the Lagrange points of acertain order. This order is given in the fields fem.equ.cporder,fem.bnd.cporder, fem.edg.cporder, and fem.pnt.cporder. These fields havethe same syntax as the gporder fields. The field fem.equ.cporder givesthe order for constraints on subdomains. Fem.equ.cporder can be a numberor a cell vector. In the first case, fem.equ.cporder applies to allsubdomain groups. In the second case, fem.equ.cporder{i} applies to theith subdomain group. Fem.equ.cporder{i} can be a number or a cell vectorof numbers. In the latter case, fem.equ.cporder{i} {k} applies to thekth constraint on subdomain group i. Similarly, fem.bnd.cporder,fem.edg.cporder, and fem.pnt.cporder gives the order for constraints onboundaries, edges, and vertices, respectively. The default value of thecporder fields is equal to the maximum of the orders of the shapefunctions being used. The fem.***.cporder fields are entered in thedialog box of FIG. 38 for subdomains. There are similar dialog boxes forboundaries, edges and points.

Equations may be represented in weak form are stored in the fieldsfem.equ.weak, fem.bnd.weak, fem.edg.weak, and fem.pnt.weak. In oneembodiment, the field fem.equ.weak contains the integrand in theintegral over subdomains. Fem.equ.weak can be a string expression or acell vector. In the first case the expression applies to all subdomaingroups. In the second case, fem.equ.weak{k} applies to the kth subdomaingroup. Fem.equ.weak{k} can be an expression or a cell vector ofexpressions. In the latter case, the expressions in the cell vector areadded. In the expressions representing the integrand, the test functioncorresponding to a variable v is denoted v_test. Then v_test will havethe same shape functions as v. Similarly, the fields fem.bnd.weak,fem.edg.weak, and fem.pnt.weak contain integrands that are integratedover boundaries, edges, and points, respectively. All these integralsmay be included on the right-hand side of the weak equation.

It should be noted that the function v_test as used herein is describedin finite element literature, for example, as in Claes Johnsson,“Numerical Solution of Partial Differential Equations by the FiniteElement Method”, Studentlitteratur, ISBN 91-44-25241-2, Lund, Sweden,1987.

For a time-dependent problem, the terms containing time derivatives maybe stored in fem.equ.dweak, fem.bnd.dweak, fem.edg.dweak, andfem.pnt.dweak. These have the same syntax as the weak fields, exceptthat the time derivatives must enter linearly. The time derivative of avariable v is denoted v_time. The integrals defined by the dweak fieldsare put on the left-hand side of the weak equation. The FIGS. 39, 37,44, and 43 shows the dialog boxes for entering the fields weak and dweakfor subdomains, boundaries, edges, and points, respectively.

Eigenvalue problems are specified like time-dependent problems. Thenv_time may be interpreted as minus the eigenvalue times v.

The constraints in the weak problem formulation are stored in the fieldsfem.equ.constr, fem.bnd.constr, fem.edg.constr, and fem.pnt.constr.These constraints are implemented pointwise. The constraints onsubdomains (R(n), where n is the space dimension) are given in the fieldfem.equ.constr. This field can be an expression or a cell vector. In thefirst case, the expression fem.equ.constr is constrained to be zero onall subdomain groups. In the second case, fem.equ.constr{k} applies tothe kth subdomain group. Fem.equ.constr{k} can be an expression or a(possibly empty) cell vector of expressions. These expressions areconstrained to be zero on the kth subdomain group. Similarly,constraints on boundaries, edges, and vertices are defined infem.bnd.constr, fem.edg.constr, and fem.pnt.constr, respectively.

It should be noted as described elsewhere herein that the equations,constraints (such as the boundary conditions), and the initialconditions of the PDE problem, are stored in the fields fem.equ,fem.bnd, fem.epg and fem.pnt. The field fem.equ contains informationpertaining to the subdomains, i.e., geometric domains of the samedimension as the space. For a 3-D geometry, a field fem.epg is relatedto the edges (curves) and for both a 2-D and 3-D geometry there can be afield fem.pnt which corresponds to vertices (points). As describedelsewhere herein, equations represented within this data structure maybe given in a “strong” form of PDE, or in a “weak” form as an equalityof integrals. The strong form has two variants, coefficient form orgeneral form, suitable for linear and nonlinear problems, respectively.The form of this equation is specified in fem.form as describedelsewhere herein. After the PDE problem is specified, the extended meshstructure fem.xmesh can be constructed. The extended mesh includes alow-level description of the PDE problem. In one embodiment, such anextended mesh may be produced, for example, by invoking a particularfunction. The solution to a particular set of PDE's may be computed byinvoking one of the solvers as described elsewhere herein in accordancewith the particular type of PDE specified, for example, time-dependentor eigenvalue PDE's.

The solution vector or the solution matrix is stored in the subfield uof the data structure field fem.sol. Additionally, other fields withinthe subfield fem.sol for the solution may include fields used, forexample, when there are time-dependent or eigenvalue solutions produced.In other words, the data structure, for example an instance of the datastructure 250, may use different fields in accordance with the differenttype of PDE solution formed.

It should be noted that an embodiment can also include any one or moreof a variety of different software tools for the visualization andprocessing of data. For example, tools may be included which provide forevaluation of a particular integral or expression for a particular setof points.

As also described elsewhere herein, there are both local and nonlocalcouplings that may be included in an embodiment. Generally, variablesmay be evaluated locally which is to say that their value at eachevaluation point may be computed using information at that particularevaluation point. It is also possible to define nonlocal couplingvariables for which the value at each evaluation point is the result ofa computation carried out elsewhere in the same geometry or withinanother geometry. These variables may then be used, for example, in thePDE coefficients or during post processing. These types of variables maybe referred to as the nonlocal dependencies.

Referring to FIG. 41, shown is an example of a weak formulation 1100 orweak solution form. The first equation 1102 is the weak equation, andthe others are the constraints 1104. Here W is the subdomains, B is theboundaries (including outer and internal boundaries), and P is thevertices (points) defined in the geometry. The integrands W⁽¹⁾ arescalar expressions involving the dependent variables u₁, u₂, . . . ,u_(N) as well as the test functions v₁, v₂, . . . , v_(N), and theirderivatives. The test functions and their derivatives enter linearly.

Referring to FIG. 42, shown is a conversion from general form to weakform. Moreover, conversion from general form to weak form is performedaccording to the formula 1200, as shown in FIG. 42, where there is animplicit summation over the k and i indices in each product, and n isthe space dimension. Affected fields are therefore ga, f, weak, da anddweak from equ and g, weak, r and constr from bnd, with weak, dweak andconstr, which are the only fields remaining. Other fields within equ andbnd, such as shape, init, etc., remain unchanged.

In addition, when converting to weak form, according to FIG. 42,fem.border can be taken into account. That is to say that if fem.borderis not 1 or on, there may be borders on which boundary conditions shouldnot be applied. In order to decide in which subdomains each dependentvariable is in use, and hence decide on which boundaries and borders toapply conditions, a comparison is made between the variable names infem.dim and the field variables defined by the shape function objectsbeing used.

Referring to FIGS. 48-50, shown is an example of another embodiment of aflowchart of steps of one method for automatically specifying one ormore systems of PDEs, which PDEs are associated with non-local couplingof variables, representing the PDEs in a single combined form, andsolving a system of PDEs. Many of these steps are similar to thosedescribed in connection with, for examples, FIGS. 22 and 23 describedelsewhere herein. What will now be described are a highlight ofadditional steps with respect to other descriptions in connection withFIGS. 22 and 23.

Referring now to FIG. 48, the flowchart 2200 at step 2202, a firstgeometry is selected. At step 2204, a determination is made as towhether all geometries are processed. If not, control proceeds to step2100. If all geometries are processed, control proceeds to step 2120.Generally, the processing steps set forth in FIG. 49, flowchart 2000 maybe performed for each geometry of interest and are similar to otherprocessing steps described elsewhere herein in connection with otherFIGS. However, the processing steps of FIG. 49 utilize PDEs in the weakform. Thus, step 2114 provides for forming the weak form of theequations from the general form of step 2112.

Referring now to FIG. 51, shown is a flowchart of steps that may beincluded in one embodiment in forming and solving for a solution ofPDE's. The flowchart 2124 begins with step 2500 where the weak form ofPDE's are formed. At step 2502, a stiffness matrix is determined. Atstep 2504, a residual matrix is determined. At step 2506, a constraintmatrix is determined. At step 2508, a constraint residual is determined.At step 2510, the discretized system of PDE's may be solved inaccordance with the type of the system of PDE included. Depending on thetype of PDE's being solved, different outputs of the various processingsteps 2502-2508 may be used. This is described in more detail elsewhereherein.

Referring now to FIG. 52, shown is a flowchart of steps of oneembodiment for computing a stiffness matrix. At step 2550, a loopcounter variable i is initialized to 0. At step 2552, a determination ismade as to whether all weak terms have been processed. If adetermination is made that all weak terms have been processed, controlproceeds to step 2556 where the stiffness matrix is formed by addingtogether all the stiffness matrices for the weak terms.

If a determination is made at step 2552 that all weak terms have notbeen processed, control proceeds to step 2554 where the current weakterm is assigned to be the next weak term and the variable sum isinitialized to 0. At step 2558, a determination is made as to whetherall evaluation points have been processed. If not, control proceeds tostep 2560 where P is assigned the next set of one or more evaluationpoints.

The total set of evaluation points may be determined using thequadrature formula. The number of points in one set of evaluation pointsmay be chosen to optimize performance that may vary in accordance witheach embodiment. For example, in an interpreted environment, such asMATLAB, the parsing of an expression can have a high computational cost.One might therefore choose a high number of points. On the other hand,processing many points “in parallel” costs lots of memory, so the numberof points may also be limited in accordance with the amount of availablememory.

At step 2562, Jacob_V is assigned to be the computed Jacobian ofvariable V at the points included in P. It is at step 2562 at which arecursive nature of this technique may be observed such that theappropriate routine is called to compute the Jacobian in accordance withthe type of Variable V. Control proceeds to step 2564 where the variableJacob_W is assigned the computed Jacobian of the variable W at thepoints included in P. As with step 2562, processing of step 2564 is alsorecursive in this embodiment of the processing steps included inflowchart 2502. Control proceeds to step 2566 where the variable sum isupdated to include the product of the Jacobian of V and W multiplied bythe weights of the points in P. Weights may be determined usingtechniques known to those of ordinary skill in the art, for example,using the quadrature formula as described in, for example, the FiniteElement Method volume 1, by Zienkiewicz et al. described elsewhereherein.

Control proceeds to the determination at step 2558 where a furtherdetermination is made as to whether all evaluation points have beenprocessed. If so, control proceeds to step 2568 where the variablesweak_term_stiffness_matrix[i] and i are updated. Control proceeds tostep 2552 to determine whether all weak terms have been processed.

Referring now to FIG. 53, shown is a flowchart of one embodiment forcomputing a residual vector. The steps in flowchart 2504 are moredetailed processing steps with reference to step 2504 of flowchart 2124.At step 2600, a variable i is initialized to 0. At step 2602, adetermination is made as to whether all weak terms have been processed.If so, control proceeds to step 2616 where the residual vector is formedby adding all residual vectors for the weak terms. If all weak termprocessing is not complete, control proceeds to step 2604 where sum isinitialized to 0 and the current weak term is assigned the next weakterm to be processed. Control proceeds to step 2606 where adetermination is made as to whether all evaluation points have beenprocessed. If not, control proceeds to step 2608 where P is assigned thenext set of one or more evaluation points. At step 2610, the Jacobian ofvariable V is computed at all points in P. At step 2612, values ofvariable W are computed for the points in P. Steps 2610 and 2612 includerecursive processing in order to determine the Jacobian and value,respectively, in accordance with variable type. At step 2614, sum isupdated by the product Jacobian of V*Value of W*weight of the points P.The points P and weight may be determined using techniques describedelsewhere herein. Control proceeds to step 2606 where a determination ismade if all evaluation points have been processed. If so, controlproceeds to step 2618 where the following variables are updated:weak_term_residual_vector[i] to store the results from the current weakterm, and i.

Referring now to FIG. 54, shown is a flowchart 2506 of more detailedprocessing steps for determining a constraint matrix that may beincluded in an embodiment. At step 2650, the matrix C is initialized. Atstep 2652, a determination is made as to whether all constraintvariables have been processed. If so, processing stops. Otherwise,control proceeds to step 2654 where W is assigned the next constraintvariable. At step 2656, a determination is made as to whether allevaluation points have been processed. If so, control proceeds to step2652. Otherwise, control proceeds to step 2658 where P is assigned thenext set of one or more evaluation points. The evaluation points may bedetermined in accordance with values specified in the cporder field ofthe xfem data structure described elsewhere herein. At step 2660, theJacobian of W is computed at the points P and the vector of partialderivatives comprising the computed Jacobian are appended as the lastrows in the matrix C at step 2662. Control proceeds to step 2656.

Referring now to FIG. 55A, shown is a flowchart of steps of anembodiment that may be used in determining a constraint residual vector.At step 2680, M is initialized as the empty vector. At step 2682, adetermination is made as to whether all constraint variables have beenprocessed. If so, processing stops. Otherwise, control proceeds to step2684 where W is assigned the next constraint variable. Control thenproceeds to step 2686 where a determination is made as to whether allevaluation points have been processed. If so, control proceeds to step2682. Otherwise, control proceeds to step 2670 where P is assigned thenext set of evaluation points. At step 2672, values of variable W arecomputed at the points P and assigned to Val_W. At step 2674, Val_W isappended as the last rows in the vector M. Control proceeds to step2686.

Referring now to FIG. 55B, shown is a flowchart of steps of anembodiment that may be used in determining the value of a variable at aset of points P. At step 2702, a determination is made as to whether thevariable V is a basic variable. If so, control proceeds to step 2712where the values of the basic variable V at points P are determined.Otherwise, control proceeds to step 2704 where a determination is madeas to whether the variable V is of the auxiliary type. If so, controlproceeds to step 2714 where values for the auxiliary variable aredetermined. Otherwise, control proceeds to step 2706 where adetermination is made as to whether the variable V is a glued variable.If so, control proceeds to step 2716 where the value of glued variable Vis determined. Otherwise, control proceeds to step 2708 where adetermination is made as to whether the variable V is a mapped variable.If so, control proceeds to step 2718 for computing the value of themapped variable V. Otherwise, the variable is an integrated typevariable and its value is accordingly determined.

Referring now to FIG. 55C, shown is a flowchart of steps of anembodiment that may be used in determining the values of a basicvariable at a set of points P. At step 2720, the values for a set ofpoints are determined and returned. A vector of values is returned inwhich a jth element of the vector corresponds to a sum for a singlepoint pj.

Referring now to FIG. 55D, shown in is a flowchart of steps of anembodiment that may be used in determining the values of an auxiliaryvariable at a set of points P. At step 2732, it is determined whichvariables occur in the defining expression for the auxiliary variable.Additionally, the variable i is initialized to 0. At step 2734, adetermination is made as to whether all variables have been processed.If not, control proceeds to step 2736 where V is assigned the nextvariable and i is updated. At step 2738, the values of the variable Vare determined at points P. VAL[i] is a vector of values where the jthcomponent of VAL[i] corresponds to the jth point in P. Control proceedsto step 2734 where a determination is made as to whether all variableprocessing is complete. If so, control proceeds to step 2740 where thedefining expression of the auxiliary variable is evaluated using VAL[i],for all entries in VAL. It should be noted that an expression may beevaluated, for example, using procedures available for use with thecommercially available product MATLAB that parse the expression andapply appropriate mathematical functions to the operands. Controlproceeds to step 2742 where the expression value is returned as a vectorof values.

Referring now to FIG. 55E, shown is a flowchart of steps of anembodiment that may be used in determining the values of a gluedvariable at a set of points P. At step 2752, a determination is made asto which variables comprise the glued variable. Additionally k and VALare initialized. Control proceeds to step 2754 where a determination ismade as to whether all variable processing is complete. If so, controlproceeds to step 2760 where the vector VAL is returned that includes anelement for each evaluation point. Otherwise, control proceeds to step2756 where k and V are updated. I is determined as the indices of pointspj included in P that are within the domain k. Note that k indexes boththe domains and the corresponding variables. At step 2758, VAL[j] isassigned the computed values of variable V at points pj included in I.In other words, the values of V are computed for those points pj forwhich j belongs to I. In this example at step 2758, this is performed bya call to compute_values_of var. The returned values are then placed inthe appropriate indices j of the vector VAL. Control proceeds to step2754.

Referring now to FIG. 55F, shown in is a flowchart of steps of anembodiment that may be used in determining the values of a mappedvariable at points in a set P. At step 2782, global coordinates of thepoints in P are determined. At step 2784, the global coordinates of themapped points are determined. At step 2786, using a search technique,the local coordinates for points Q are determined. At step 2788, V isthe variable that is mapped and the values of the variable V aredetermined at points in Q.

Referring now to FIG. 55G, shown is a flowchart of steps of oneembodiment for determining the values of an integrated variable at a setof points P. At step 2802, the evaluation points q(1) and thecorresponding weights are determined as described elsewhere herein. Theindex vector J is also determined as described elsewhere herein. At step2804, R is assigned the computed values of variable V at points q(1),l=1, 2, . . . . At step 2806, VAL[j] is determined. R is a vectorincluding values of V at all points q(1), l=1, 2, . . . . A single entryVAL[j] corresponds to the value of the integrated variable at the jthpoint. At step 2808, VAL is returned as the vector of values.

Referring now to FIG. 55H, shown is a flowchart of steps of anembodiment for computing the Jacobian of a variable V at a set of pointsP. At step 2822 a determination is made as to whether V is a basicvariable. If so, the Jacobian of the basic variable is determined atstep 2832. Otherwise, control proceeds to step 2824 where adetermination is made as to whether V is an auxiliary variable. If so,control proceeds to step 2834 where the Jacobian of the auxiliaryvariable V is determined. Otherwise, control proceeds to step 2826 wherea determination is made as to whether V is a glued variable. If so,control proceeds to step 2836 where the Jacobian of the glued variable Vis determined. Otherwise control proceeds to step 2828 where adetermination is made as to whether V is a mapped variable. If so,control proceeds to step 2838 where the Jacobian of the mapped variableV is determined. Otherwise, the variable is an integrated variable andthe Jacobian of the integrated variable V is determined at step 2830.

Referring now to FIG. 55I, shown is a flowchart of steps of anembodiment for computing the Jacobian of a basic variable V at points P.At step 2852, J1.DOF is determined. At step 2854, J1.VAL is determined.At step 2856, J1.EP is determined. At step 2862, the J1 is returned.

It should be noted that as described herein, for all the functions thatcompute the Jacobian, what is returned is not the Jacobian matrix inthis embodiment. Rather, a representation of the Jacobian is returned.This representation is a list of so-called “contributions”, according tothe data format for the Jacobian as described elsewhere herein.

Referring now to FIG. 55J, shown is a flowchart of steps of anembodiment for computing the Jacobian of an auxiliary variable. At step2882, k is initialized to 0 and it is determined which variables occurin the defining expression E of the auxiliary variable. Control proceedsto step 2884 where a determination is made as to whether all variableshave been processed. If not, control proceeds to step 2886 where V isassigned the next variable to be processed and k is updated. At step2888, J[k] is assigned the computed Jacobian of the variable V at pointsin P. At step 2890, the partial derivative of the expression withrespect to V is determined symbolically and then evaluated at pointsincluded in P. An embodiment may utilize the compute_values_of_varroutine as described in connection with FIG. 55B in evaluating theexpression of the partial derivative noted as DEDV in step 2890 inaccordance with variable types. Other routines,compute_values_of_XXX_var, are called recursively in accordance withvariable type. K[k] is determined from J[k] and C[k] as describedelsewhere herein. Control proceeds to step 2884 where a determination ismade as to whether all variables have been processed. If so, controlproceeds to step 2892 where the concatenation of K[k] for all k isperformed and returned as the Jacobian.

Referring now to FIG. 55K, shown is a flowchart of steps of anembodiment for computing the Jacobian of a glued variable at a set ofpoints P. At step 2902, it is determined which variables comprise theglued variable. Additionally, k is initialized to be 0. At step 2904, adetermination is made as to whether all variables have been processed.If not, control proceeds to step 2904 where k and V are updated.Additionally, I is assigned all indices j of the points pj in P that arein the domain k. At step 2908, J[k] is determined as the computedJacobian of V at points pj for all j in the set I. Additionally, K[k] iscreated from J[k] and I. Control proceeds to step 2904 where adetermination is made as to whether all variable processing is done. Ifso, control proceeds to step 2910 where all of K[m] for all m areconcatenated and returned.

Referring now to FIG. 55L, shown is a flowchart of steps of anembodiment for determining a Jacobian of a mapped variable at a set ofpoints P. At step 2922, the global coordinates for P are determined. Atstep 2924, the global coordinates of the mapped points are determined.At step 2926, using a search technique, the local coordinates of themapped points Q are determined. At step 2928, the Jacobian for V isdetermined at points Q where V is the variable that is mapped.

Referring now to FIG. 55M, shown is a flowchart of steps of anembodiment for determining the Jacobian of an integrated variable at aset of points P. At step 2952, evaluation points q(1) are determined andcorresponding weights. Index vector J is determined. Determination ofevaluation points, weights and index vector J is described elsewhereherein in more detail. At step 2954, the Jacobian of V is determined forpoints q(1), l=1, 2, . . . . At step 2956, K[k] is determined from J[k]and w, as also described in more detail elsewhere herein. At step 2958,K is returned.

Referring now to FIG. 56, shown is an example of an embodiment of a datastructure that may be used in representing a plurality of geometriesthat are coupled.

The data structure 3000 is headed by a pointer xfem. Included in thedata structure 3000 is an extended mesh or xmesh structure 3002. Foreach of the geometries, a fem data structure instance such as 3004a-3004 n is included. It should be noted that each instance of the femdata structure such as 3004 a may be an instance of the data structure1000 described in connection with FIG. 40. The field 3006 may includeone or more elements that are used to define the different types ofvariables in non-local couplings. It should be noted that an embodimentmay also include non-local couplings which are not between geometriesbut specified within a single geometry also within a single femstructure. Also shown in the data structure 3000 is the sol or solutionfield 3016. The sol field is a structure with a subfield u, which is asolution vector or a solution matrix. Each column in the solution matrixor vector contains the values of all the degrees of freedom. If u issolution matrix, then each column corresponds to the solution at acertain time value or eigenvalue. For time-dependent or eigenvalueproblems, sol can have additional subfields containing the time valuesor eigenvalues. It should be noted that an embodiment may also includeother fields in the data structure of FIG. 56.

Referring now to FIG. 57, shown is an instance of a non-local variableor coupling specified such as 3006 a. It should be noted that eachinstance of a non-local coupling included in the field 3006 may have asimilar structure to that of FIG. 57. A particular instance of elemcplfor a non-local coupling variable may include an elem field which iselcplscalar, elcplextr, or elcplproj, indentifying either a scalarcoupling, an extrusion coupling, or a projection coupling, respectively,as described elsewhere herein. Other embodiments may also include othertypes of couplings. Also included is an src (source) field 3022 and itssubfields as well as a dst (destination) field 3026. It should be notedthat other data fields shown in connection with FIG. 57, such as meshpand ep, are described elsewhere herein in more detail.

It should be noted that various fields of the data structure 3006 a maybe used in accordance with the different types specified in field 3020.In other words, for a scalar coupling type, different fields of the datastructure may be used in contrast to when the type specified in field3020 is one corresponding to a projection coupling. Uses of differentfields included in the data structure 3006 a, for example, are describedin more detail elsewhere herein in accordance with each of the differentof the different types of non-local couplings and variables.

In one embodiment, the extended mesh data structure, referred to asxfem.xmesh herein, may be created by invoking a function meshextendwhich creates the xmesh data structure in accordance with the PDEproblem as described in the xfem structure. In one embodiment, theroutine meshextend may be invoked after an instance of fem structure isdefined for each geometry, and may perform the following:

1. The PDE problem specification is translated to an intermediate form,which is stored as a cell vector xmesh.el. Each entry in this cellvector is an object, called an element object. An element object definesa part of the PDE problem, like variables, equations, or constraints. Anelement object also has a number of methods that can perform varioustasks.

2. The element objects xmesh.el{i} may introduce a number of new nodepoints within the mesh elements, in addition to the mesh verticescontained in the basic meshes xfemlem{g}.mesh. The function meshextendorganizes all these node points in the data structures in xmesh.

3. Each element object xmesh.el{i} introduces a partition of (a subsetof) the domains of dimension edim. Meshextend finds the commonrefinement of these partitions, the mesh domain groups. This means thata mesh domain group is a maximal collection of domains that belong tothe same group, for all of the partitions given by the element objects.

4. The element objects xmesh.el{i} can introduce degree of freedomnames. Meshextend collects all these names in the cell vectorxmesh.name. Meshextend also collects all local degrees of freedomcreated by the element objects into a list of global degrees of freedom.Each global degree of freedom is given a number. A degree of freedom isa pair consisting of a degree of freedom name and a node point. When thenode point is specified by giving its location relative to a meshelement (that is, in local coordinates), the degree of freedom may bereferred to as a local degree of freedom. When the node point isspecified in global coordinates, it may be referred to as a globaldegree of freedom. Note that two local degrees of freedom for adjacentmesh elements can correspond to the same global degree of freedom.

5. The element objects can introduce variables that can be computed.Meshextend collects this information into a table that tells whichelement object computes which variable.

What will now be described is a more detailed description of thexfem.xmesh data structure follows. xmesh is a structure with thefollowing fields:

Field name Description el Cell vector of element objects, which describedifferent aspects of the PDE problem. p Node points for the extendedmesh in all geometries. p is a cell vector of matrices. p{g} is a matrixwhose columns are the global coordinates for all node points in geometrynumber g. elmesh Mesh data relating to the individual element structuresxmesh.el{i}. The field elmesh is a nested cell vector of so-called“element mesh structures”. More precisely, elmesh{i} {edim + 1} is astructure containing mesh data related to mesh elements of dimensionedim and the element object xmesh.el {i} described below. dmesh Domainmesh data, that is, mesh data not specific to individual elementstructures. dmesh is a cell vector of “domain mesh structures”. In otherwords, dmesh{edim + 1} is a structure containing mesh data related tomesh elements of dimension edim, described below. name name{g} is a cellvector containing the degree of freedom names in geometry number g. gdofNumbering of the global degrees of freedom. gdof is a cell vector ofmatrices. The matrix gdof{g} contains global degree of freedom numbersfor node points in geometry g. That is, gdof{g}(n, iname) is the numberof the global degree of freedom that corresponds to node point number nand name number iname. Here n is the second index in xmesh.p{g}, andiname is the index into xmesh.name{g}. If there is no degree of freedomassociated to the pair (n, iname), we have gdof{g}(n, iname) = 0.

What will be described in following text are fields in the “domain meshstructure” xmesh.dmesh{edim+1} which in this embodiment includes thefields g, ind, n, np, ix, and elvars.

Field Name Description g cell vector with geometry numbers. g{imdomgrp}is the number of the geometry that the mesh domain group imdomgrp (indimension edim) resides in. ind cell vector with mesh domain groups indimension edim. That is, ind{imdomgrp) is a vector containing thenumbers of the domains (of dimension edim) that belong to mesh domaingroup number imdomgrp. n cell vector of matrices containing node pointnumbers for the mesh elements. The columns of n {imdomgrp} contains thenode point numbers for the mesh elements within mesh domain group numberimdomgrp in dimension edim. That is, n{imdomgrp}(mp, me) is the globalnode point number (second index into xmesh.p{g}) for node point numbermp within mesh element number me in mesh domain group imdomgrp. np cellvector containing local coordinates for node points. More precisely,np{imdomgrp} is a matrix whose columns are the local coordinates for thenode points in mesh elements in mesh domain group imdomgrp in dimensionedim. In other words, np{imdomgrp}(1:edim, mp) are the local coordinatesfor node point number mp. (This is the same for all mesh elements withinthe mesh domain group imdomgrp.) ix cell vector containing indices intothe basic mesh xfem.fem{g}.mesh. ix {imdomgrp} is a vector with basicmesh element indices for the mesh elements within mesh domain groupimdomgrp in dimension edim. ix {imdomgrp}(me) is the number for the meshelement in the basic mesh xfem.fem {g} .mesh that corresponds to meshelement me in mesh domain group imdomgrp. elvars cell vector of cellmatrices, containing information about variables. elvars {imdomgrp} iscell matrix with 3 rows that contains information about which variablescan be computed in mesh domain group imdomgrp in dimension edim. Thefirst row contains variable names. The second row contains thecorresponding indices i for the element objects that compute thesevariables. The third row contains the corresponding mesh domain groupindices idomgrp specific to these element objects, see below.

Now we describe the fields of the “element mesh structure” elmesh{i}{edim+1}. This structure has the fields mind, elind, rows, and name.

Field Description mind cell vector containing the indices imdomgrp forthose mesh domain groups that are subsets of any domain group ofdimension edim defined by element object number i. The index into mindis denoted idomgrp. elind cell vector containing the element domaingroup indices corresponding to the indices idomgrp. This means that themesh domain group with number mind(idomgrp) is a subset of the domaingroup with number elind(idomgrp) defined by element object number i indimension edim. rows Defines which rows in the matrix dmesh{edim +1}.n{imdomgrp} are used by element object number i. The field rows is amatrix. For the mesh domain group mind(idomgrp), and an element nodepoint number elp (for element object number i and dimension edim), thecorresponding mesh element point number mp is given by mp = rows(elp,idomgrp). name Specifies a mapping from names for local degrees offreedom to names for global degrees of freedom. The field name is avector. Consider a variable that occurs as local degree of freedom forelement object number i in geometry g and dimension edim. Let idim beits index in the variable list defined by the element object. Let inamebe its index in the global list xmesh.name{g}. Then iname = name(idim).

Following are additional screenshots that may be included in anembodiment. In particular, these screenshots may be included in anembodiment in which equations in weak form may be utilized.

Referring now to FIG. 58, shown is a screen shot 3200 that may be usedin connection with defining a multiphysics model that consists ofseveral application modes and one or more different geometries. One maystart in the top left portion of the screen 3200 by specifying the spacedimensions such as one, two or three dimensional and edit the names ofthe independent variables. Application modes may then be selected fromscreen portion 3202 and added to the model causing them to appear on theright hand portion of the screen 3204.

It should be noted that in connection with this FIG. and othersdescribed in following text, similarities may be seen between featuresdescribed here and in previous FIGS. in connection with other screenshots.

Referring now to FIG. 59, shown is an example of different file menuoptions that may be included in an embodiment of the model navigator,for example, as shown in connection with screen shot 3200 of FIG. 58. Inconnection with the file menu 3250, various options may be included inan embodiment, for example, to start a new model, open a model filealready existing, and save the currently created model. Additionally,model properties may be edited and stored in the file. An embodiment mayalso include an option to import model data from, for example, anapplication such as MATLAB or from a workspace or another file.Similarly, options may exist to export the model or portions thereof toother applications or a file. What will now be described are someoptions that may be used in connection with the options selection tag3254 from the screen shot menu 3250.

Referring now to FIG. 60, shown is an example of an embodiment of anoptions menu 3260 that may be included in an embodiment. The optionsmenu may include, for example, certain features related to display itemssuch as a grid or an access display as well as adding and editingconstants, variables, expressions, and the like.

What will now be described are functionalities that may be included withadding and editing coupling variables 3262.

Referring to FIGS. 45A, 45B and 45C, shown are various pages of aCoupling Variable Settings dialog box 1500, respectively showing aVariables page 1500 a, Source page 1500 b and Destination page 1500 c.In the Coupling Variable Settings dialog box 1500 a user can specifynon-local coupling variables. On the Variables page 1500 a shown in FIG.45A, a user can specify the name of the coupling variable in theVariable name edit field 1502. The type of coupling is specified in theVariable type drop-down list box 1504. A user can select scalar,extrusion or projection variables from the Variable type drop-down listbox 1504. After a user has entered a new variable name, the user canclick Add 1506 to add the new variable name to the list of couplingvariables. The user can also click Delete 1508 to delete the highlightedvariable in the list.

On the Source page 1500 b, as shown in FIG. 45B, the source of thecoupling is specified, i.e. the details of the evaluation undertaken.The evaluation may take place in any geometry in one or more of thedomains at one of the levels subdomain, boundary, edge, or point. Thelevels which may be used are partly dependent on the geometry selectedin the Geometry drop-down list box 1502, and partly dependent onvariable type being used, so not all levels will always be available inthe Level drop-down list box 1504.

When selecting geometry and domain level, the Source page 1500 b willenter the corresponding mode. Domains are then selected either from thelist box 1506 or by clicking on the domains in the GUI. For extrusionvariables, the expression given in the Expression edit field 1508 willbe the one which is evaluated within the selected domain(s). For scalarand projection variables, the Expression edit field 1508 is replaced byan Integrand edit field (not shown), and the Integration order editfield (not shown), which gives the order of the Gauss quadrature rulewhich is used for integrating the variables over the source domains forthe scalar variable, along the projection curve for projectionvariables.

The Local mesh transformation edit fields x 1510 a, y 1510 b, and z 1510c may only be used when defining an extrusion or projection variable.The fields 1510 a, 1510 b and 1510 c contain expressions of the spacecoordinates, e.g. x, y, and z, or local mesh parameters, e.g. s, s1, ors2, which are then applied to create a new source mesh for use ininterpolating or setting the position and direction of lines used forevaluating line integrals. The number n of these edit fields, which areenabled, depends on the dimensionality of the domain(s) used as thesource. For example, n is 2 if using boundaries in a 3-D geometry,because such boundaries are 2-D surfaces. These edit fields maycorrespond to the cell vector src.meshp, for example, in the datastructures described herein for extrusion and projection couplingvariables.

On the Destination page 1500 c, as shown in FIG. 45C, a user can definewhere the variable is to be made available. The destination geometry anddomain are specified in the same way as the source geometry, level, anddomain are specified on the Source page 1500B. For scalar variables, auser may use the “Active in this domain” checkbox in order for thespecified variable to be available in the selected domain. For extrusionand projection variables, defining an Evaluation point transformation inthe edit fields x 1512 a, y 1512 b, z 1512 c activates the variable inthe selected domain. If n of the mesh transformation edit fields wereenabled on the Source page 1500 b, there will be respectively n and n−1evaluation point transformation edit fields enabled on the Destinationpage 1500 c for extrusion and projection variables. Again the meshtransformation edit fields x 1512 a, y 1512 b and z 1512 c should beexpressions of the space coordinates or local mesh parameters. Theseedit fields may correspond, for example, to the cell vector dst.ep inthe data structure for extrusion and projection coupling variables.

For extrusion variables the user can set the interpolation points withinthe source mesh. For projection variables the evaluation for eachdestination evaluation point is a line integral. The position of theline is given as follows; the first n−1 coordinates in the source meshare specified by the evaluation point transformation(s) applied to thedestination evaluation point, and the n-th coordinate is allowed tovary.

Referring now to FIG. 61, shown is an example of a dialog box 3280 thatmay be displayed in connection with defining expressions to be used in amodel. This may be used, for example, in introducing shortenings forcomplicated expressions for entering parameters used in the model. Anembodiment may also use expression variables in post processing, forexample, if a user wants to plot a quantity on a graph defined bydifferent application modes in different domains, an expression variablemay be defined that uses the correct expression in the different domainsand may be used to plot that expression variable. Displayed in a dialogbox 3280 is a variables tab 3282 and a definition tab 3284.

What will now be described is the dialog box that may be used inconnection with expression variable settings for the definition tab3284.

Referring to FIGS. 46 and 47, respectively shown are examples of avariables page 1600 a and a Definition page 1600 b of an ExpressionVariable Settings dialog box 1600. In the Expression Variable Settingsdialog box 1600, the user can define expressions to be used in a model.The Expression Variable Settings dialog box 1600 provides a convenientway to introduce short names for complicated expressions that the userwants to use when entering parameters for the model. Another use forexpression variables is in post processing, where if the user wants toplot some quantity that is defined by different application modes, whichare in different domains, the user can define an expression variablethat uses the correct expression in the different domains and then plotthe expression variable.

On the Variables page 1600 a, as shown in FIG. 46, the user can enterthe name of the variable in the Variable name field 1602 to define anexpression. Expressions can be either domain-based, i.e. atsubdomain/boundary/edge/point level, or geometry-based, i.e., theexpression is defined everywhere on the geometry. This variable type canbe specified in the Variable type drop-down list box 1604.

On the Definition page, as shown in FIG. 47, the user can specify inwhich geometry and in which domain the expression should be defined byrespectively selecting from the Geometry drop-down list 1606 and theLevel drop-down list 1608. In the Expression edit field 1610, the usercan enter the expression to be defined by the specified variable. Thedefinitions are recorded in the fields fem.expr, fem.equ.expr,fem.bnd.expr, etc. in the data structure (FIG. 40) for the appropriategeometry. Where a definition is not given in the dialog for a subdomain,the corresponding entry in fem.equ.expr will be the empty matrix, whichmeans that it is not defined, this similarly holds true for bnd, edg,and pnt.

In connection with the assigned variable names selection of the optionsmenu 3266, an assigned variable names dialog box may be displayed asshown in connection with FIG. 62.

Referring now to FIG. 62, shown is an example of a dialog box 3290 thatmay be displayed in connection with assigning variables. The assignedvariables dialog box may be used to edit assigned variable names for allvariables belonging to application modes in a current model. Assignedvariables may be used for post processing. They may be createdautomatically and based on a fixed name each of them gets a unique name.

In connection with application scalar variables as included in optionsmenu item number 3268, an application scalar variable dialog box may bedisplayed.

Referring now to FIG. 63, shown is an example of an embodiment of anapplication scalar variable dialog box 3292. In some applications,scalar variables may exist that take part in mathematical model but areindependent of the geometry and material for example. The value of suchapplication specific scalar variables may be set using this dialog box.Scalar variables may be included, for example, in predefined applicationmodes. For example, in one embodiment, in connection with an applicationmode related to AC power electromagnetics, scalar variables such asomega may be used in representing angular frequency. Additionally, someof the modes in which the optional electromagnetics module andstructural mechanics module may be included and may also include suchscalar variables. It should be noted that an embodiment may disable thismenu if no such quantities exist.

In connection with the differentiation rules option menu 3270, adifferentiation rules dialog box may be displayed and used in anembodiment.

Referring now to FIG. 64, shown is an example of an embodiment of adialog box 3294 that may be used in connection with specifyingadditional differentiation rules. In particular, these rules may be usedto symbolically differentiate coefficients and a PDE in a general form,and to compute the Jacobian of a variable.

In connection with the draw menu 3296 as displayed, for example, in FIG.60, different options may be available in connection with a particulardimension of the geometry of the model.

Referring now to FIG. 65, shown is an example of an embodiment of apoint menu 3310. In this example, the point menu 3310 may include threeoptions or items including point mode, point settings, and an option toview point data as point coefficients. The point mode option may be usedto enter or indicate point mode. Point settings may be used to specifypoint settings for selected points. The “view as point coefficients”option may be used to view or edit application specific point settingsas generic point settings.

Referring to FIG. 43, shown is an example of a Point Settings dialog box1300. The Point Settings dialog box allows 1300 permits entry offem.pnt.weak, fem.pnt.dweak and fem.pnt.constr fields on each point inthe respective weak 1302, dweak 1304, and constr 1306 fields of thedialog box 1300.

Referring now to FIG. 66, shown is an example of a dialog box 3312 thatmay be used in connection with displaying point settings in coefficientview. When this option is turned on, point settings open a new tabdialog box, such as 3312. Using this dialog box, initial values may bespecified and shape functions may also be specified on the init andelements page, respectively, in addition to the weak terms on the weakpage.

Referring now to FIG. 67, shown is an example of an embodiment of a menufor edge options that may be used in connection with three dimensionalmodels in this embodiment. The edge menu 3314 in this example containsthree options. The first option is edge mode where edge mode is enableor indicated. In the edge settings option which will be explained inmore detail below, edge settings may be specified for selected edges.Additionally, an option in this embodiment may be included to viewapplication specific edge settings as generic edge settings.

Referring to FIG. 44, shown is an example of an Edge Settings dialog box1400. The Edge Settings dialog box 1400 permits entry of fem.edg.weak,fem.edg.dweak, and fem.edg.constr fields on each edge (in 3-D) in therespective weak 1402, dweak 1404 and constr 1406 fields of the dialogbox 1400. In coefficient view, there are similar user interfaces foradding weak, dweak, and constr contributions on boundary and subdomainlevel.

Referring now to FIG. 68, shown is an example of a dialog box 3320 thatmay be used in connection with edge settings. In connection with thedifferent tabs included, initial values may be specified with the inittab. Shape functions may be specified with the elements tab.Additionally, weak terms may be specified on the weak tab.

Referring now to FIG. 69, shown are examples of boundary menu optionsthat may be enabled in connection with different dimensional geometries.In particular, the boundary menu may appear as in 3332 in connectionwith one and two dimensional geometries and may appear as in 3334 forthree dimensional objects or geometries.

The boundary mode option may be used to enable or indicate boundarymodes. The boundary settings option may be used to specify boundaryconditions for selected boundaries. Enable borders may be used to enableor disable the assembly of boundary conditions on subdomain borders.View as boundary coefficients may be used to view or edit applicationspecific boundary conditions as generic boundary conditions. The showdirection arrows option may be used to show direction arrows for thedifferent boundaries. It should be noted that certain menu options maybe enabled in accordance with the dimensions of a geometry. The optionfor generating coupled equation variables is used to enable or disablethe automatic generation of the equation-based variables on boundaries.Similarly, the generate coupled-shaped variables may be used to enableor disable the automatic generation of shape function-based variables onboundaries.

In one embodiment, one can generate boundary-coupled variablescorresponding to the basic variables and their derivatives, and callthem boundary shape variables, such as for example in connection withmenu option 3332 a. In an embodiment, one may also be able to generateboundary-coupled variables corresponding to the terms in an equation oncoefficient or general form, and call them equation-based boundaryvariables, for example, as in connection with option 3332 b.

Referring now to FIG. 70, shown is an example of a dialog box 3340 thatmay be used in connection with boundary settings. In particular, theweak tab in 3340 is displayed which may be used to specify weak termsand constraints in connection with specifying boundary conditions.

Referring now to FIG. 71, shown is an example of a dialog box 3344 thatmay be used in connection with PDE models having more than one dependentvariable. The dialog box shows the boundary settings for coefficientform PDE with two dependent variables. One may select boundaries fromthe list box, or using other techniques that may be included in anembodiment.

Referring now to FIG. 72, shown is an example of a dialog box that maybe used in connection with the subdomain settings. In particular, whenthe weak tab is activated as shown in the dialog box 3350, weak termsmay be specified on selected subdomains.

Referring now to FIG. 73, shown is an example of an embodiment of menusand dialog boxes that may be displayed in connection with a solve orsolutions menu that may be used in connection with specifying optionsfor partial differential equation solutions and solving methods. Inparticular, the solve menu options may be included as in 3372. Inconnection with the parameters option, the dialog box for solverparameters 3374 may be displayed.

Referring now to FIG. 74, the multiphysics page or tab in connectionwith the solver parameters option may cause dialog box 3380 to bedisplayed. Using this multiphysics tab, the user may control how tosolve a multiphysics model which is specified. For example, this dialogbox 3380 may be used to specify which variables to solve for and howinitial value should be updated if you want to solve using an iterativeapproach where the previous solution becomes the initial values in anext iteration. In the solve for variables section, a list of allapplication modes may be displayed. The solver may solve all variablesin all selected application modes. By default, an application mode inthe model is selected. If the show variables option is checked, the listshows all of the variables in the model and you may individually selectamong all of the variables in the application modes. In the updatemechanism for the initial value U section, it may be specified how toupdate the solution used as an initial value. For example, if the storesolution button is active, the solution used for the initial value orvaluation is updated using the current solution. In selecting thestorage solution automatically option, this causes the solution used forthe initial value to be stored automatically when a new solution hasbeen computed. From the use solution number drop-down box, a user mayselect which solution to use. For time-dependant models, the default isto use the solution at the last output time.

Referring now to FIG. 75, shown are examples of a menu and dialog boxthat may be used in connection with a multiphysics menu option. Thedialog box 3394 may be used to select application modes for a currentmultiphysics model. It should be noted that for PDE modes, an embodimentmay have more than one dependent variable. The space dimension of themodel may be determined by entering one or more space-separated variablenames. For example, in the screen dialog box 3394, three independentvariables, X, Y and Z, are entered and it is considered a 3-D geometry.

In reference to the foregoing dialog boxes, user interfaces, and thelike, data may be entered for each geometry. In this embodiment, thereare menu options and items used in connection with weak equations thatmay be stored in fields and subfields of the fem data structure, forexample as shown in FIG. 40, and the xfem data structure, for example,as shown in FIG. 56. In particular, data used in connection with theweak dialog tabs may be stored in fem.***.weak, fem.***dweak, andfem.***.constr fields. Data used in connection with the “ExpressionVariables” dialogs as described herein may be used in adding variables,for example, to the fields fem.expr and fem.***.expr in data structuresdescribed herein.

An embodiment may associate particular functionality described hereinwith particular functions or methods. In one embodiment, each of thefollowing is associated with a particular, method: computing the valuesof a variable, computing the Jacobian of a variable, assembling theresidual vector of a weak term, assembling the stiffness matrix,assembling the constraint residual vector, and assembling the constraintJacobian.

It should be noted that as described elsewhere herein, an embodiment mayinclude functions, routines or methods in accordance with eachparticular implementation that embody functionality described herein.For example, in one embodiment, an object oriented scheme may be used inwhich, geometry objects may be predefined in a class structure as, maybe included in an embodiment using a C++ programming language forexample. Additionally, as also described elsewhere herein, differentmethods may be invoked in accordance with each particular class.

Several specific examples, as set forth herein, include a scalarcoupling example, an extrusion coupling example, and a projectioncoupling example, followed by a discussion of the Weak solution form andthe Solvers; Sparsity of Jacobian and Non-Local Dirichlet BoundaryConditions. In addition, other specific examples, as set forth herein,include a Packed Bed Reactor example and a Magnetic Brake example.

Extended Multiphysics Coupling Variables

Variables in FEMLAB are generally evaluated locally—their value at eachevaluation point is computed using information only from that evaluationpoint. In contrast, the value of a coupling variable is the result of acomputation carried out elsewhere in the geometry or even in anothergeometry altogether. When used in the PDE and boundary conditions, theresult is the introduction of non-local dependencies—extendedmultiphysics—as opposed to ordinary multiphysics, which refers todependencies between variables in same geometric location.

The coupling variables are extremely powerful in their ability to makethe values of an expression available non-locally. The couplingvariables are not only useful for modeling coupled problems—they canalso be used solely for post processing and visualization purposes.

All coupling variables are defined in two steps. First define thesource, i.e., the domains in which the evaluation takes place, thenature of that evaluation, and the name given to the resulting variable;secondly define the destination, i.e. the domains within which it ispossible to use the resulting variable.

There are three kinds of coupling variables implemented: scalar,extrusion, and projection.

Specifying Non-Local Couplings

In the graphical user interface you can define coupling variables byusing the Coupling Variable Settings dialog box from the Options menu asshown in FIG. 76.

The Source and Destination tabs allow you to define the source anddestination details and the Variable type gives the choice of scalar,extrusion, or projection variables.

Scalar Couplings

Use scalar coupling variables to make scalar values available elsewherein your model. The source of the scalar value can be an expression in avertex. In addition, the source of the scalar value can be the integralof an expression over one or several subdomains, boundaries, or edges.The destination of the scalar variable can be the full geometry, one orseveral subdomains, boundaries, edges, or vertices.

Scalar Coupling Example

As a simple example, consider the case of Poisson's equation on a singlerectangular domain as shown in FIG. 77. The integral of the square ofthe solution is used as in-flux in a Neumann boundary condition on theright boundary. There is a Dirichlet boundary condition on the leftboundary, and the top and button boundaries have zero in-flux. Theproblem is nonlinear so you have to use the nonlinear solver. The rightboundary condition contains the scalar coupling variable in acoefficient, so the weak solution form must be used.

$\mspace{20mu} \begin{matrix}{{\Delta \; u} = I} & {{on}\mspace{14mu} \Omega} \\{u = x} & {{on}\mspace{14mu} {\partial\Omega_{1}}} \\{\frac{\partial u}{\partial n} = 0} & {{{on}\mspace{14mu} {\partial\Omega_{2,3}}}\;} \\{\frac{\partial u}{\partial n} = {- {\int_{\Omega}{u^{2}\text{?}\Omega}}}} & {{on}\mspace{14mu} {\partial\Omega_{4}}}\end{matrix}$ ?indicates text missing or illegible when filed

Model Navigator

Start FEMLAB and select the 2-D, Coefficient, Nonlinear, PDE mode in theModel navigator. Use the Lagrange-Quadratic element type. Press the Morebutton, and select solution form Weak.

Draw Mode

-   -   Draw a single rectangle of any size.

Boundary Mode

-   -   Change the following boundary coefficients:

BOUNDARY 1 2-3 4 Type Dirichlet Neumann Neumann r x g 0 int2

Subdomain Mode

-   -   Use the default PDE coefficients (Poisson's equation).    -   Open the Add/Edit Coupling Variables dialog box.    -   Enter the variable name int2, and choose the default type        Scalar. Press Add.    -   Go to the Source page and select subdomain 1. Enter −û2 in the        Expression field, and enter 4 in the Integration order field.    -   As a simple rule, the integration order can be the maximum of        the quadrature order for the integration of the shape functions        of the variables in the expression.    -   On the Destination page, select boundary 4 and check Active in        this domain.    -   Return to the Variables page to check the definition. Finally,        press OK.

Solve Problem

-   -   Press the Solve Problem button to start the simulation.

Post Mode

-   -   Open the Subdomain Integration item on the Post menu. Type −û2        in the expression field. Select subdomain 1 and press Apply. The        integral of the solution is displayed in the message log.    -   Open the Plot Parameters dialog box. Check Contour and uncheck        Surface. Press the Contour tab. Change the Contour expression to        ux. Click in the GUI on the right boundary, and verify that the        in-flux is equal to the integral.

Brief Examples of Scalar Couplings

One example of scalar couplings is to use scalar values from a verticeson the adjacent boundary as shown in FIG. 78A. In structural mechanics,you can use this type of coupling to formulate displacement constraintsalong a boundary in terms for the displacements of the end point.

Another example is to use the integral over a subdomain in a 2-Dgeometry along a subdomain in another 1-D geometry as shown in FIG. 78B.This is useful for process industry models, where two differentprocesses interact.

Extrusion Couplings

An extrusion coupling variable takes values from the source domain(s) byinterpolation of an expression at points that are dependent in some wayon the position of the evaluation points in the destination domain(s).

When the destination domain has more space dimensions than the sourcedomain, the variable performs extrusion of values. The extrusioncoupling variable can also be used for mapping values from the source tothe destination. This is applicable when the source and destinationdomains have the same number of space dimensions.

The method employed is that first a one-to-one transformation is appliedto the mesh of the source domain(s). This transformation may be trivialand leave the coordinates unchanged, but it can also be used to rescale,stretch, bend, or reflect the mesh. Then a second transformation isapplied to the evaluation points in the destination domain(s), and theresulting points are used for the interpolation of an expression atpoints in the transformed source mesh.

Extrusion Coupling Example

Consider the case of a single rectangular domain, where the source termin Poisson's equation comes from the inward flux over the right boundaryfor the corresponding y coordinate.

$\begin{matrix}{{\Delta \; u} = {\frac{\partial}{\partial n}{u\left( {x_{2},y} \right)}}} & {{on}\mspace{14mu} \Omega} \\{u = {xy}} & {{on}\mspace{14mu} {\partial\Omega}}\end{matrix}$

The FIG. shown in FIG. 79 illustrates the extrusion process. The valuesof the in-flux on the boundary become available throughout the domain byextrusion along the y-axis. The source transformation mapping is y, andthe destination transformation mapping is y.

The problem is linear so you can use the linear solver. We use the weakterm to specify the source term in the Poisson equation, so we do nothave to use the weak solution form.

Model Navigator

-   -   Start FEMLAB and select the 2-D, Coefficient, Linear, PDE mode        in the Model navigator. Use the Lagrange-Quadratic element type.

Draw Mode

Draw a single rectangle of any size.

Boundary Mode

-   -   In boundary mode, select all boundaries. Set the r coefficient        to x*y.

Subdomain Mode

-   -   On the Weak tab, set the subdomain 1 weak term to u_test*flux.        (Poisson's equation with source flux).    -   Open the Add/Edit Coupling Variables dialog box.    -   Enter the variable name flux and choose the default type        Extrusion and press Add.    -   Go to the Source page and select boundary 4. Enter ncu in the        Expression field, and set local mesh transformation to y.    -   On the Destination page, select subdomain 1, and set local mesh        transformation to y.    -   Return to the Variables page to check the definition. Finally,        press OK.

Solve Problem

-   -   Press the Solve Problem button.

Post Mode

-   -   On the Surface tab, change Surface expression to flux.    -   On the Line tab, check Line plot, and select ncu as Line        expression.    -   Press OK.

The plot shows both the value of the flux variable on the destinationdomain and the source ncu on the boundary.

Brief Examples of Extrusion Couplings

One application of extrusion couplings is to mirror the solution in thex-axis as shown in FIG. 80A. This can be very useful for postprocessing. The source transformation mapping is x, y, and thedestination transformation mapping is x, −y.

Another example is to extrude the solution in the 1-D geometry to the2-D along the s axis as shown in FIG. 80B. The source transformationmapping is x, and the destination transformation mapping is r.

Yet another example is to map values on the lower boundary to the rightboundary on the same rectangle as shown in FIG. 80C. The sourcetransformation mapping is (x+1)/2 and the destination transformationmapping is y.

Projection Couplings

A projection coupling variable takes values from the source domain(s) byevaluating a series of line integrals within the source domain(s), wherethe line positions are dependent on the positions of the evaluationpoints in the destination domain(s). In this way you can evaluate theaverage of a variable over one space variable at a range of differentpoints along the other space axis, giving a result which varies over thelatter space variable.

The method employed is that first a one-to-one transformation is appliedto the mesh of the source domain(s). The last space dimension in thetransformed mesh is the one integrated over, so the lines used tointegrate are vertical in the transformed source mesh. The placement ofthe vertical lines in the transformed source mesh is given by thepositions of the transformed destination evaluation points. Theintegrals are then carried out in the source domain(s) over lines whichcorrespond to the vertical lines in the transformed source mesh.

Then a second transformation is applied to the evaluation points in thedestination domain(s), and the resulting points are used for theinterpolation of an expression at points in the transformed source mesh.

Brief Examples of Projection Couplings

Referring to FIGS. 81A-81C, for each point r return

$\mspace{20mu} {{v(r)} = {\int\limits_{{y = {r/2}}{{({x,y})}\text{?}S_{1}}}{{u\left( {x,y} \right)}{x}}}}$?indicates text missing or illegible when filed

The source transformation mapping is y, x, and the destinationtransformation mapping is r/2.

For each point (0,s) return

$\mspace{20mu} {{v\left( {0,s} \right)} = {\int\limits_{y = {{s({x,y})}\text{?}S_{1}}}{{u\left( {x,y} \right)}{x}}}}$?indicates text missing or illegible when filed

The source transformation mapping is y, x, and the destinationtransformation mapping is s.

For each point (r,0) return

${v\left( {r,0} \right)} = {\int\limits_{{y = {r/2}}{{({x,y})} \in S_{1}}}{{u\left( {x,y} \right)}{x}}}$

The source transformation mapping is y, x, and the destinationtransformation mapping is r/2.

Also non-rectangular domains can be swept by the integration. Only thesource domains will be included in the integrals. Other domains and theexternal area will be excluded from the integrals.

The Weak Solution Form and the Solvers

FEMLAB computes the exact Jacobian contribution for the couplingvariables when the coupling variables are evaluated as weak terms. Theeasiest way of achieving this is by using solution form Weak. It canalso be achieved by with solution form Coefficient or General byspecifying all coupling variables in weak terms on the Weak tabs.

If you use a coupling variable in a coefficient, without using solutionform Weak, the Jacobian is likely to be incorrect—and the nonlinearsolver might not converge even for linear couplings.

For stationary problems with coupling variables, you should always usethe nonlinear solver—it can sometimes be difficult to see if the problemis nonlinear or not. If you are sure about the linearity of the problem,and coupling variables only occur in weak terms, the linear solver canbe safely used.

Sparsity of Jacobian

The Jacobian for problems formulated using the finite element method isusually large, but rather sparse, i.e., with relatively few nonzeroelements. This is because the solution at each node in the mesh can bedependent at most on the degrees of freedom from the neighboring meshelements. If however coupling variables are introduced, non-localdependencies are introduced, filling up the rows and columns of theaffected source and destination nodes. This extra filling may make theJacobian matrix slightly less sparse (in which case the solution speedis only slightly affected) or it may make it a great deal less sparse(in which case the memory use and CPU time involved in solving theproblem may be increased a great deal). For this reason care should betaken when introducing non-local couplings.

Non-Local Dirichlet Boundary conditions

When using coupling variables in Dirichlet boundary conditions, theconstraint is handled by adjusting both the source and the destinationvalues until the constraint is satisfied. This corresponds approximatelyto how periodic boundary constraints are handled in FEMLAB, and this maybe appropriate in the context of the problem being modeled. Often,however, it is more appropriate to leave the source unaffected andconstrain only the destination.

Multidisciplinary Models Magnetic Brake

This example studies a magnetic brake that slows down a copper diskrotating in the magnet's air gap as illustrated in FIG. 86. The rotationinduces currents, and forces along the current lines impede the disk'smotion.

This time-dependent problem will be solved in two different ways: firstusing FEMLAB's extended multiphysics feature, and second as a Simulinksimulation. In both cases the stationary problem of computing themagnetic field in the disk given a certain angular velocity co will besolved first.

Assume the disk rotates around the z-axis with angular velocity ω. Thevelocity v at a point (x,y) is then

v=ω(−y,x,0).

When the disk is inserted in the air gap and it encounters the magneticfield B₀, the configuration induces a current density j according toLorentz' equation:

$\left\{ {\begin{matrix}{{E + {v \times \left( {B + B_{0}} \right)}} = {\frac{1}{\sigma \; a}j}} \\{{\nabla{\times E}} = 0} \\{{\nabla{\times B}} = {\mu \; {j.}}}\end{matrix}\quad} \right.$

In these equations, B represents the magnetic field, E the electricfield, μ the permeability, σ the electric conductivity, and d theplate's thickness. This example uses the Dirichlet boundary conditionB=0.

In this model the magnetic flux B has only a vertical component and thecurrents and electric field have no z-components. Solving for B givesthe following scalar partial differential equation:

−div(∇B+μσdω(B+B ₀)( ))=0

where B is the z-component of B and B₀ equals the z-component of B₀.

Now consider how the system evolves over time. The disc is slowed downby the induced torque and an ordinary differential equation (ODE) mustbe set up to model the angular velocity ω.

To obtain the time derivative of the angular velocity ω, the torquearising from the induced currents must be computed. For a small surfaceelement, the force equals

dF=j×(B+B ₀)dxdy

and integrating over the disk gives the total torque:

$M = {\int_{Disk}{\frac{1}{\mu}r \times \left\{ {\left( {\nabla{\times B}} \right) \times \left( {B + B_{0}} \right)} \right\} \ {x}{{y}.}}}$

In this case, M has only a z-component with the value

$M = {\int_{Disk}{\frac{1}{\mu}{\left( {{y\frac{\partial B}{\partial x}} - {x\frac{\partial B}{\partial y}}} \right) \cdot \left( {B + B_{0}} \right)}{x}{{y}.}}}$

Thus the ODE for ω may be formulated as

${J\frac{\omega}{t}} = M$

where the moment of inertia J for a disk with radius r equals

$J = {{m\frac{r^{2}}{2}} = {\frac{\rho \; {dr}^{4}\pi}{2}.}}$

Model library FEMLAB/Multidisciplinary/magnet_brake

Using the Graphical User Interface—Fixed ω

Before solving the time-dependent problem, consider first the problemwhere w is fixed.

Select the 2-D, Coefficient, Linear stationary PDE mode in the ModelNavigator. Click on the button marked More, change the Dependentvariable name to B and then click OK.

Options and Settings

-   -   To help when drawing the geometry, set axis and grid settings:

AXIS GRID X min −0.16 X spacing 0.05 X max 0.15 Extra X 0.03 0.07 Y min−0.1 Y spacing 0.02 Y max 0.1 Extra Y

-   -   Enter the following constants:

NAME EXPRESSION K 4e−7 * pi * 5.99e7 * 0.02 w 2 * pi * 100

The variable w represents the fixed angular velocity ω. The variable Kis the product of μ, σ and d.

Draw Mode

-   -   Draw a circle centered at (0,0) with a radius of 0.1.    -   Draw a square centered at (0.05,0) with each side 0.04 units        long as shown in FIG. 87.

Boundary Mode

-   -   Check that the boundary settings are:

BOUNDARY 5, 6, 7, 8 Type Dirichlet h 1 r 0

Subdomain Mode

-   -   Enter PDE settings as shown:

SUBDOMAIN 1, 2 c 1 a, f, d_(a) 0 α K * w * y −K * w * x γ −K * w * BO *y K * w * BO * x

-   -   The applied field B₀ is used here and it has not been defined.        It is different in the two subdomains, so it's best to use the        Add/Edit Expressions dialog    -   Enter the name BO, select type subdomain and click Add in FIG.        88.    -   Click the Definition tab, select subdomain 1 and enter the        expression 0    -   Select subdomain 2 and enter the expression 1e−3. Then press OK        in FIG. 89.

Mesh Mode

-   -   Open the Mesh Parameters dialog box by selecting Parameters . .        . from the Mesh menu and set Max. edge size, general to 0.04.    -   Click on More and enter 20.01 in the Max element size for        subdomains box as shown in FIG. 90.    -   Press OK and then press the Initialize Mesh button.    -   Press the Refine mesh button.

Solve Problem

-   -   Press the Solve Problem button to solve the problem. (Time to        solve: 5 s) as shown in FIG. 91.

Using the Programming Language—Fixed ω

-   -   % Clear the FEM structure, set the variable name and    -   % choose quadratic elements.    -   clear fem    -   fem.dim=‘B’;    -   fem.shape=2;    -   % Specify the constants K and w.    -   fem.variables={‘K’,4e−7*pi*5.99e7*0.02, . . .    -   ‘w’,2*pi*1001;    -   % Create the geometry.    -   fem.geom=circ2(0,0,0.1)+rect2(0.03,0.07,−0.02,0.02);    -   % Specify the boundary conditions, i.e. homogeneous Dirichlet    -   % conditions at the edge of the disk (boundary elements 5, 6, 7%        and 8).    -   fem.bnd.h=1;    -   fem.bnd.r=0;    -   fem.bnd.ind={5:8};    -   % Specify the PDE coefficients.    -   fem.equ.c=1;    -   fem.equ.al={{{‘K*w*y’ ‘−K*w*x’}}};    -   fem.equ.ga={{{‘−K*w*B0*y’ ‘K*w*B0*x’1}};    -   fem.equ.expr−{‘BO’ {‘0’ ‘1e−3’}};    -   % Generate the mesh.    -   fam.mesh=meshinit(fem, ‘hmax’,{0.04 [ ] [ ] [2 0.01]});    -   fem.mesh=meshrefine(fem);    -   % Solve the problem and plot the solution.    -   fem.xmesh=meshextend(fem);    -   fem. sol=femlin(fem);    -   postplot(fem,‘tridata’, ‘B’, ‘tribar’, ‘on’, . . .    -   ‘trirefine’,10, ‘axisequal’, ‘on’);

Using the Graphical User Interface—Time-Dependent ω

In this section FEMLAB's extended multiphysics feature will be used tosolve the time-dependent problem.

The approach taken here will be to set up a second geometry to handlethe ODE for angular velocity

${J\frac{\omega}{t}} = M$

-   -   and then use extended multiphysics element structures to allow        variables from each geometry to be made available when solving        the problem in the other geometry.

Note An alternative approach is to use only one geometry and introduce anew variable w, active at a single point within that geometry using aPoint weak form, application mode. In this alternative the same couplingvariables M and w are used but the source and destination domains wouldhave to be suitably altered. The ODE for w would then be specified usingthe coefficients on the Weak tab in the Point settings dialog; firstmultiply both sides of the ODE by the test function for w, then setdweak and weak to be the left and right hand side respectively, i.e.J*w_time*w_test and m*w_test.

Options

-   -   Add the following constants to the variable list which already        includes K and w:

NAME EXPRESSION J 8960 * 0.02 * 0.1 * 4 * pi/2 mu 4e−7 * pi

-   -   Select the variable w in the list and Delete it so the list        consists only of K, J and mu. The variable w here will be        replaced by the dependent variable w from the ODE.    -   In the Add/Exit Expressions dialog box, select the variable BO        in the list and change its definition in subdomain 2 to 0.1

Add Geometry

-   -   Now add the new geometry to handle the ODE. An ODE can be        thought of as a zero-dimensional PDE, so in principle a        zero-dimensional geometry is all that is required here, but        since there is no support for this in the graphical user        interface, a trivial one-dimensional geometry will be used        instead. In addition, the use of coupling variables means weak        solution form must be used.        -   From the Multiphysics menu, choose Add/Edit Modes.        -   Change the Solver type to Time dependent and the Solution            form to Weak.        -   Click on the button marked Add to the right of the Geometry            name list.        -   Select I-D using the Dimension radio buttons.        -   From the list on the left, select PDE, coefficient form.        -   Change the Dependent variable name to w.        -   Click on the >> button in the middle of the dialog box to            add this mode and geometry to the model.        -   Change the Solution form to Weak for this new geometry as            well.        -   Click OK.

Draw Mode

-   -   From the Draw menu, choose Specify geometry.    -   Enter 0 and 1 in the Start and Stop fields respectively.    -   Click OK.

Define Coupling Variables

There are two extended multiphysics couplings in this model. In otherwords, two variables which are to be made available beyond the domainsin which they exist naturally.

Firstly, the source term M in the ODE described in geometry 2 wasdefined earlier to be

$M = {\int_{Disk}{\frac{1}{\mu}{\left( {{y\frac{\partial B}{\partial x}} - {x\frac{\partial B}{\partial y}}} \right) \cdot \left( {B + B_{0}} \right)}{x}{y}}}$

-   -   so the result of this integral over subdomains 1 and 2 in        geometry 1 must be made available in geometry 2 as the variable        M.

Secondly, the angular velocity variable w is used in the coefficients αand γ the PDE in geometry 1. Previously w was defined in the Add/EditConstants dialog box, but this time it must be taken from geometry 2.Thus the dependent variable w in geometry 2 must be made available inthe subdomains of geometry 1.

Define M first

-   -   Open the Add/Edit Coupling Variables dialog    -   Enter the variable name M and select the default type scalar    -   Press Add in FIG. 92.    -   Click on the Source tab and then select Geom1, subdomain level        as the source    -   Select subdomains 1 and 2 and set the integration order to 2 and        the integrand (B+B0)*(y*Bx−x*By)/mu as shown in FIG. 93.    -   Click on the Destination tab and select Geom2, subdomain level    -   Select subdomain 1 and check the Active . . . box as shown in        FIG. 94.

Now make w available in geometry 1

-   -   From the Variables tab, add a scalar variable with the name w    -   On the Source tab set the source as Geom2, subdomain 1, with an        integrand w and integration order 1.    -   Set the Destination as Geom1, subdomains 1 and 2    -   Press Apply.

To check the variables have the correct source and destination domains,click on the Variables tab in FIG. 95.

Note that the definition of w here means ‘use the integral of w oversubdomain 1 in geometry 2’, but since w will be constant over the wholesubdomain and the subdomain has length 1, this is the same as simplytaking the value w at any point in the subdomain.

Boundary Mode

-   -   Set the boundary settings:

BOUNDARY 1, 2 Type Neumann q 0 g 0

Subdomain Mode

-   -   Enter PDE settings as shown:

SUBDOMAIN 1 c, a, α, β, γ 0 d_(a) J f M init 2 * pi * 200

Mesh Mode

-   -   Open the Mesh Parameters dialog box by selecting Parameters . .        . from the Mesh menu and set Max. edge size, general to 1.    -   Press OK and then press the Initialize Mesh button.    -   Select Geometry 1 from the Multiphysics menu.    -   Press the Initialize Mesh button. This resets the mesh to a        coarser mesh than the one used in the fixed ω case in order to        shorten the solution time for the time dependent case.

Solve Problem

-   -   Open the Solve parameters dialog box and turn to the        Timestepping page.    -   Set the Output times to 0 8, and select fldae as the        Timestepping algorithm, with Relative tolerance 1e−3 and        Absolute tolerance 1e−5.    -   Click OK.    -   Press the Solve Problem button on the toolbar.

Plot Mode

Once the problem has been solved, the results can be visualized in anumber of ways.

-   -   An animation of the dissipation of B over time can be shown by        pressing the Animate button.    -   For a graph of the ω against time, select Geometry 2 from the        Multiphysics menu and open the Cross-section plot parameters        dialog box from the Post menu. Select all the time steps in the        list box and select Point plot. Then, on the Point sheet, make        sure that the Point expression is w and click OK as shown in        FIG. 96.    -   For a graph of dω/dt against time, follow the same procedure as        for ω, but set the Point expression to M/J instead.

Results

The plots for ω and dω/dt against time are shown in FIGS. 97A-97B.

Packed Bed Reactor

One of the most common reactors in the chemical industry, for use inheterogeneous catalytic processes, is the packed bed reactor as shown inFIG. 82. This type of reactor is used both in synthesis as well as ineffluent treatment and catalytic combustion. The reactor consists inessence of a container filled with catalyst particles. These particlescan be contained within a supporting structure, like tubes or channels,or they can be packed in one single compartment in the reactor.

The structure that is formed by the packed catalyst particles makes themodeling of mass and energy transport in the reactor a challenging task.The difficulty lies in the description of the porous structure, whichgives transport of different orders of magnitudes within the particlesand between the particles. In most cases, the structure between theparticles is described as macro porous and the pore radius can be of theorder of magnitude of mm. When a pressure difference is applied acrossthe bed, convection arises in the macro pores. The pores inside thecatalyst particles form the microstructure of the bed. The pore radiusin these particles is often between one and ten mm.

This model presents a simple and fast alternative for studying macro-and micro-mass balances in packed beds and other heterogeneous rectorswith bimodal pore distribution. The simulation gives the mass andreaction distribution, and the same type of approach for the heatbalance accounts for the temperature profile in the reactor. Theequations are based on simple mass balances for the macro and microsystems.

The mass balance for the macro system are based on the equation forconvection-diffusion-reaction:

Λ−(−D∇c+cu)+R=0

In the above equation D denotes the diffusion coefficient (m² s⁻¹), cconcentration (mol m⁻³), u the velocity vector (m s⁻¹) and R denotes thereaction term (mol m⁻³ s⁻¹). The solution of the above equation requiresproper boundary conditions:

c=c ₀ at ∂Ω_(inlet)

−D∇c·n=0 at ∂Ω_(outlet)

(−D∇c+cu)·n=0 at all other boundaries

At a first glance, these equations look simple to solve, especially ifthe velocity vector is given by an analytical expression, which is thecase for plug flow in a packed bed reactor. However, the reaction term,R, depends on the transport in the micro particles, which in general isobtained by calculating the flux into the particles, at the outersurface of the particle, times the available outer surface area of theparticles per unit volume:

R=A _(p) N(r=R _(p))·n

In this equation, A_(p) denotes the outer surface area of the particleper unit volume (m² m⁻³), N denotes the flux vector (mole m⁻² s⁻¹), inthis case the flux in the porous particle, r the independent variablefor the radius of the particle (m), R_(p) the radius of the particle,and n the normal vector to the particle surface.

To solve the equations above, the reaction term, R, has to becalculated. This implies the formulation of a new mass balance in microscale. Such a mass balance is expressed by the equation below:

Here, D′ is the effective diffusion coefficient in the particle, c′ isthe concentration in the particle, and k the reaction rate constant forthe heterogeneous reaction in the particle (mol_((γ-1))s⁻¹ m^(3(γ-1)))In this case, transport takes place by diffusion only.

The diffusion-reaction equation, combined with the boundary conditionsfor the particle, give the concentration distribution in the particle.

−D ⁻ ∇ε′·n=0 at r=0

-   -   where ε denotes the porosity of the particle. This implies        symmetry in the middle of the particle. In addition, the        concentration at the surface of the particle is equal to the        concentration outside of the particle compensated by the fact        that part of the particle volume is occupied by solid catalyst        support.

The concentration distribution in the particle gives the flux at everypoint in the particles. This implies that the reaction term for thecatalyst bed is given by the solution of the micro mass balance:

R=A _(p)(−D∇ε′·n)

The complication in solving this system of equations is that the macrobalance and the micro balance are defined in different coordinatesystems. This problem is general for many chemical reaction engineeringapplications and is often solved by using analytical approximations ofthe solution to the micro balance. One possibility is to use Thielemodulus in the effectiveness value formulation. However, this approachcannot be used for complicated reaction mechanisms involving severalreacting species. The solution exemplified here is general and can beused for very complex reaction mechanisms involving a large number ofspecies.

Input data for the model are the following:

EXPRESSION VALUE D 1e−6 D′ 1e−7 c0 3 u 0 A_(p) 4e3  k 100 ε 0.6 R_(p)1e−3 γ 1.5

Model Library Chemical_Engineering/Mass_Transport/packed_bed_reactor

Solving the Problem Using the Graphical User Interface

The approach here will be to model the bed as a 1-D model withindependent variable x. At each x-coordinate there is also a model ofone particle typical of all of the particles at that position in thepacked bed. Since the particles are spherically symmetric and thesurface concentration c is to all intents and purposes constant aroundeach particle, a 1-D model with independent variable r can be used foreach of the particles. In order to model particles for each positionalong the packed bed, many such 1-D models can be placed side by sidecreating effectively a 2-D geometry with independent variables x and r.

In this 2-D model all of the particles can be modeled independently.There is therefore a 2-D geometry for the particles and a 1-D geometryfor the packed bed. Two couplings are used in the model. The packed bedconcentration is used in the boundary condition for the particles andthe flux at the surface of the particles is used in the reaction term inthe packed bed.

-   -   Firstly switch to the Multiphysics window in the Model        Navigator. Select the 2-D, ChEM: Diffusion application mode.        Name the dependent variable c1 whilst setting the independent        variables to x and r respectively. Press Add and select Solution        form: Weak.    -   Now choose a Weak, boundary constraint from the list, name the        dependent variable lambda and Add the mode. This mode is added        because coupling variables appearing in Dirichlet boundary        conditions should usually be handled with weak boundary        constraints.    -   Press the topmost Add button to select a new geometry. Use 1-D        as the dimension and press the top Add button once more.    -   Select the ChEM: Convection and diffusion application mode. Name        the Dependent variable to C and then Add the mode.    -   Select Solution form: Weak, Solver type: Nonlinear stationary        and press OK.

Draw Mode

-   -   Choose 1 Geom1: Diffusion (di) from the Multiphysics menu.    -   Draw a unit square with it's lower left corner at (0,0).

Mesh Mode

-   -   Select Parameters from the Mesh menu and enter 2e−1 in the Max        edge size, general field.    -   Press the More button and enter 3 1e−2 in the Max element size        for edges field. This makes the mesh very fine on boundary 3        which represents the outer surfaces of all of the particles,        near which the concentration changes rapidly. Press Remesh and        then OK.

Draw Mode

-   -   Choose 3 Geom2: Convection and Diffusion (cd) from the        Multiphysics menu.    -   Double click on the line and specify a geometry from 0 to 1.

Mesh Mode

-   -   Select Parameters from the Mesh menu, enter 2e−2 in the Max edge        size, general field, press Remesh and then OK.

Options and Settings

-   -   Enter the following variable names for use later, in the        Add/Edit Constants window under the Options menu.

NAME EXPRESSION gamma 1.5 D1 1e−7 D 1e−6 C0 3 k 100 epsil 0.6 Ap 1e3  rp1e−3 u 0.4

Enabling the Extended Multiphysics Couplings

-   -   First define a variable C_x to be available on boundary 3 in the        particle geometry (the outer surfaces of the particles) to be        equal to the packed bed concentration C at the corresponding        x-coordinate.    -   Open the Add/Edit Coupling Variables dialog under the Options        menu.    -   Enter C_x in the Variable name edit field and select extrusion        from the Variable type drop-down menu. Then press Add.    -   Switch to the Source tab and select the Geometry Geom2 at the        subdomain Level. Then select 1 in the window.    -   Enter C in the Expression field and enter x for the Local mesh        transformation coordinate x.    -   Switch to the Destination tab, select Geom1 for the Geometry,        boundary for the Level and choose boundary 3. Enter x in the        Evaluation point transformation x field.    -   Press Apply.    -   Now define a variable Ndotn_x to be the normal surface flux for        the particles at position x, and make this variable available in        the packed bed geometry.    -   Switch back to the Variables. Referring to FIG. 83, name the        variable Ndotn_x and choose extrusion for its Variable type,        then press Add.    -   Go to the Source tab and select Geom1 at the boundary Level.        Select boundary number 3 and enter Dl*cir/rp as the Expression        and x as the Local mesh transformation x coordinate.    -   Switch to the Destination tab and select Geom2 for the Geometry        at the subdomain Level. Select 1 and enter x as the Evaluation        point transformation x.    -   Press OK and the coupling variables have been defined.

Subdomain Mode

-   -   Choose 1 Geom1: Diffusion (di) from the Multiphysics menu.    -   Enter subdomain settings according to the following table.

SUBDOMAIN 1 D₁ (anisotropic) 0 0 0 (D1/rp{circumflex over ( )}2) *r{circumflex over ( )}2 R_(i) −k * r{circumflex over ( )}2 *c1{circumflex over ( )}gamma

-   -   Note that the diffusion is only in the r direction because the        2-D geometry is not a physically 2-D domain, merely a more        efficient way of handling a large number of 1-D models set one        beside the other.

Boundary Mode

-   -   First select Insulation/symmetry conditions for boundaries 1, 2        and 4. The third boundary should be a Concentration boundary        with epsil*C_x as its value.    -   Switch to the second Multiphysics mode: 2 Geom1: 1 variable weak        constraint mode (w1). Open the Boundary Settings dialog and        select boundary 3. Make it Active in this domain by selecting        this checkbox and enter c1 as the Constraint variable. Press OK        to make it active.

Subdomain Mode

-   -   Choose 3 Geom2: Convection and Diffusion (cd) from the        Multiphysics menu.    -   Enter subdomain settings according to the following table.

SUBDOMAIN 1 D₁ D R_(i) −Ap * Ndotn_x u u

Boundary Mode

-   -   First select a Convection>>Diffusion condition for boundary 2.    -   Boundary 1 should be a Concentration boundary with CO as its        value. Finish by pressing the OK button

Solve Problem

-   -   Press the Solve button to start the simulation.

Post Mode

-   -   The default plot will give the view of the concentration        depicted in FIG. 84.    -   For the particles (Multiphysics 1) it is interesting to see a        contour plot. Open the Plot

Parameters dialog. Deselect the Surface plot and instead select Countorplot, then switch to the Contour tab. Specify x as the Contourexpression and concentration of c1 (c1) as the Height expression. Enter40 in the Contour levels field and deselect the Color bar. The effect ofthis is to lay 40 lines across the geometry at 40 differentx-coordinates and show the concentration distribution along each line.Each one therefore represents the concentration distribution within asingle particle. It is also interesting to see how the value of thenormal flux which is a multiple of c1r, changes as x changes, so switchto the Line tab and activate the line plot. Enter c1r in the Lineexpression field and c1r/20 in the Z expression field and press OK. The/20 is simply to rescale the curve to be able to see it on the same axesas the contour plot. The following plot results are shown in FIG. 85.

Turning now to FIG. 98, an exemplary aspect of a GUI 9810 for a designsystem is illustrated that includes a settings window 9820 displaying,for example, menu(s) for accessing multiphysics model settingsassociated with a linked multiphysics modeling system 9830. The designsystem is configured to interact with the multiphysics modeling system9830 by accessing settings for forming and solving the multiphysicsproblems defined in the multiphysics modeling system 9830. For example,the GUI 9810 may allow the design system to access the multiphysicsmodel setting including such items as the physical properties andboundary conditions of the system being modeled in the multiphysicsmodeling system 9830. The design system may be configured to access theboundary condition selection 9850 in the multiphysics modeling system9830 from a face selection in the design system's user interface 9810.Similarly, selection of a body or part in the geometric representationin the design system's user interface 9810 may access physicalquantities and physical properties associated with a geometrical domain9840 modeled in the multiphysics modeling system 9830. It iscontemplated that in certain embodiments access of the various physicalquantities, physical properties, and boundary condition settings may beinitiated through user selections of domains (e.g., bodies or parts) andfaces via the GUI 9810 of the design system.

As illustrated in FIG. 98, the GUI 9810 may also include a geometricrepresentation 9860 of a geometrical domain of at least a portion of asystem being modeled in the multiphysics modeling system 9830. Thewindow 9820 in the GUI 9810, used for accessing the multiphysics modelsettings, may include a display of menus that describe settings forphysical properties and boundary conditions in a multiphysics problem.The settings in the menu 9820 may be associated with entities in thegeometrical domain, such as domains, faces, edges, or verticesassociated with the system(s) being modeled, and residing in themultiphysics modeling system. It is contemplated that selections of themultiphysics settings via the window 9820 on the GUI 9810 may implementroutine(s) that describe the geometric entities and settings for themodel attributable to a particular selection. In certain embodiments,the design system may be configured for developing or assigning variousgeometric properties and physical properties of a system. The designsystem may then interface with and/or send the different geometricrepresentations, the selection of entities (e.g., domains, faces, edges,or vertices), and other setting to the multiphysics modeling system forsubsequent multiphysics modeling, which may include processing of thedata sent from the design system. It is also contemplated that it may bedesirable for the multiphysics modeling system 9830 to send a solutionor modeling result configurable for display on the GUI 9810 of thedesign system.

In certain embodiments, the design system and the multiphysics modelingsystem may reside in one or more memories, one or more processors,and/or one or more computer readable media associated with the samecomputer system. In other embodiments, the design system andmultiphysics modeling system may reside in different computer systemsconnected over a local area network or a wide area network.

Referring now to FIG. 99, an exemplary aspect is illustrated ofcommunications via a bidirectional link between a design system and amultiphysics modeling system. The communications are described in thecontext of non-limiting exemplary dynamic link communications that maybe included in a bidirectional link between a design system (e.g., acomputer-aided design system or CAD system) and a multiphysics modelingsystem. The bidirectional link may be in the form of computer codeembedded in a memory or another computer readable medium. In certainexemplary embodiments, a CAD system user interface may be used todescribe a multiphysics problem or design in the multiphysics modelingsystem. The multiphysics modeling system may seek a geometricrepresentation from the CAD system to generate a geometrical domain forthe multiphysics problem.

In certain methods of communication between a design system and amultiphysics modeling system, a design system 9910 may detect theinstallation of a multiphysics modeling system 9920, and in response,implement design system dynamic link library file(s) 9930 to facilitatecommunication with the multiphysics modeling system 9920. In addition,the multiphysics modeling system can implement multiphysics-relateddynamic link library file(s) 9940 to facilitate communication with thedesign system 9910. In one exemplary embodiment, the dynamic linklibrary files 9930, 9940 may be used to implement various commandsrelated to geometric features between the design system 9910 and themultiphysics modeling system 9920. For example, the design system 9910may be instructed to transfer geometric representations 9950 to themultiphysics modeling system 9920. In certain embodiments, the designsystem 9910 may also transfer material properties, which may be storedin the geometric representations of the design system 9910. It is alsocontemplated that in certain embodiments, the design system 9910 maymesh the geometry and send the resulting mesh to the multiphysicsmodeling system 9920 as the geometric representations. It is alsocontemplated that in certain embodiments, the multiphysics modelingsystem 9920 may be configured to search, detect, and load themultiphysics dynamic link library files 9940 to allow communication withthe design system. In addition, the design system's dynamic link libraryfiles 9930 may return the name corresponding to an installed designsystem 9910. The loaded dynamic link library files 9930, 9940 mayinclude instructions for communicating commands between the multiphysicsmodeling system 9920 and the design system 9910.

It is contemplated that the multiphysics modeling system 9920, designsystem 9910, and the bidirectional link may be executed in computersystem having a memory associated with a single processor or in acomputer system having one or more memories associated with one or moreprocessors. In certain embodiments, the multiphysics modeling systemroutine(s) may operate on one computer system, the design systemroutine(s) may operate on a second computer system, and thebidirectional link may operate on one or both of the computer systems.It is also contemplated that the bidirectional link may operate on athird computer system and that the multiphysics modeling system 9920 andthe design system 9910 communicate through the third computer system viathe bidirectional link. It is contemplated that communications betweenall the computer systems may occur asynchronously or synchronously. Forconfigurations having multiple computer systems and/or multiplememories, communications between the various computers may occur overlocal connections or a local area network. It is also contemplated thatcommunications between the various systems may occur over a wide areanetwork. It is further contemplated that communications between thevarious systems may occur wirelessly. In certain embodiments, thebidirectional link includes a series of instructions stored in a memoryand executed by a processor. It is also contemplated that thebidirectional link may comprise dedicated computer hardware having theinstructions permanently stored in a memory and communications ports forreceiving connections from the multiphysics modeling system and thedesign system computer(s) that allow communications of geometry andparameter data between the multiphysics modeling system and the designsystem.

FIG. 100 illustrates an exemplary aspect of a GUI 10000 that may be usedto establish a bidirectional link, such as the link described in FIG.99. The GUI may be displayed on a display associated with a multiphysicsmodeling system and can include various selectable icons that, whenselected, implement different operations for the multiphysics modelingsystem. For example, the selection of the “LINK WITH CAD SYSTEM” icon10015 may be configured to implement a series of instructions thatestablish a bidirectional link between the multiphysics modeling systemand a computer-aided design system. For example, the “LINK WITH CADSYSTEM” icon 10015 can be associated with and form a link between thegeometric operations of the multiphysics modeling system and a designsystem, similar to the relationship illustrated in FIG. 99. While theicon(s) illustrated in FIG. 100 may be displayed or associated withother operations of the multiphysics modeling system, the relationshipsof geometry sequence(s) 10010 and geometric operations of a designsystem can often be logically associated with the geometric aspects of aphysical system that may be the subject of multiphysics modeling. Thegeometry sequence icon 10010 illustrated in FIG. 100 can be configuredto include the geometric objects and geometric operations that definethe geometrical domain of the multiphysics modeling system, and canfurther allow these geometric aspects to be communicated to or from thedesign system once the link between the two systems is established. Inone exemplary aspect, some parts of the geometrical domain may beentirely generated in the multiphysics modeling system, such thatselection of icon 10015 is associated with and forms a link withgeometric operations for other parts generated in the design system. Forexample, a screw part may be generated in a CAD system, but a nutassociated with the screw may be generated in a geometry tool of themultiphysics modeling system. Then, by selecting icon 10015, the linkbetween the design system and modeling system is established andgeometric aspects of the screw may be transmitted to the multiphysicsmodeling system, and the geometric aspects of the nut may be transmittedto the CAD system.

Referring now to FIG. 101, a flowchart for an exemplary aspect of abidirectional link using dynamic link library (“.dll”) files isdescribed. The flowchart includes a multiphysics modeling system .dll10140 and a design system .dll 10130, similar to the multiphysics system.dll 9940 and design system .dll 9930 discussed above for FIG. 99. Asdiscussed previously, the dynamic links may be used to send commandsfrom a multiphysics modeling system via the multiphysics modelingsystem's .dll to the design system. For example, a command may ask forthe name and status of installed design systems. This is illustrated instep 10142 where the multiphysics .dll 10140 may send a request to adetected design system .dll to return the name and status of the designsystem. Upon the detection of the installed design system at step 10132,the design system .dll 10130 may at step 10134 send the name and statusof the installed design system back to the multiphysics .dll 10140. Atstep 10144, the multiphysics .dll 10140 may send the status message fromstep 10134 to the multiphysics modeling system and then proceed to step10146 where the multiphysics modeling system may send a command to themultiphysics .dll 10140 that includes, for example, a list of parametersdescribing geometric features of a physical system being modeled by themultiphysics modeling system. Proceeding from step 10146 to 10136, themultiphysics .dll 10140 in turn relays the command to the designsystem's .dll 10130 and then further to the design system where thecommand may be executed. At step 10138, a confirmation may be receivedby the design system .dll 10130 from the design system. Proceeding fromsteps 10138 to 10148, the design system .dll 10130 may send aconfirmation back to the multiphysics .dll 10140 regarding the status ofthe executed command, which in turn may be communicated to themultiphysics modeling system. As illustrated in the example of FIG. 101,when steps in the bidirectional link are executed, a command involving achange, for example, in a geometric feature in the design system canautomatically cause the design system to regenerate the geometricrepresentation, which may be generated as a file containing thegeometric representation (e.g., a Parasolid® file, a CAD file, aSolidWorks® file). The file containing the geometric representation maybe automatically loaded by the multiphysics modeling system and thegeometric operation in the geometry sequence and the geometrical domainmay then be updated. In certain aspects, the geometric representationmay also be updated in a design system user interface linked to themultiphysics modeling system.

It is contemplated that the bidirectional link between the multiphysicsmodeling system and the design system may be directly connected suchthat the detection step may not be necessary or may be simplified. Forexample, the name or identification of an installed design system may beknown or directly stored in the bidirectional link, such that, forexample, step 10134 can be removed from the aspect described in FIG.101. It is also contemplated that alternate or modified configurationsof the detection aspects may be desirable. For example, a settingdefining the name and version of an installed design system may beentered by a user, or other wise received, in the multiphysics modelingsystem before a connection is made to the bidirectional link.

Referring now to FIG. 102, an exemplary aspect of a bridge connection10210 is illustrated between a design system 10220 and a multiphysicsmodeling system 10230. A bridge connection, such as the one illustratedin FIG. 102, can communicate inputs and outputs between two systems inconjunction with operations associated with, for example, a windowhaving selectable elements in a GUI. In one embodiment, the bridgeconnection may be associated with the display of a settings window in adesign system GUI for a multiphysics model system that is connected viathe bridge connection to the design system. Operations performed in thesettings window of the GUI, such as selections from a pointer and/orkeyboard events, can be sent via the bridge connection to themultiphysics model system. In certain embodiments, a bridge connectioncan also send information to the multiphysics modeling system forselections in a display window in the design system GUI associated withgeometric representations of the system being modeled. In certainembodiments, the multiphysics modeling system can then send informationassociated with the selected geometric entity back to the settingswindow for the multiphysics modeling system that is displayed in thedesign system user interface.

The bridge connection 10210 in FIG. 102 is configured to communicatecommands associated with settings of a multiphysics model. The bridgeconnection 10210 may be activated via a user selection from a window inthe design system's user interface (e.g., see FIG. 98). In certainembodiments, the bridge connection 10210 may be automatically activatedupon the implementation or execution of the computer-implementedinstructions of the design system 10220. It is contemplated that incertain embodiments, the design system 10220 may detect the installationor execution of the computer-implemented instructions for themultiphysics modeling system and based on that detection activate thebridge connection 10210. It is also contemplated that the design system10220 may be configured to start a process that executes thecomputer-implemented multiphysics modeling system 10230.

The bridge connection 10210 can be configured so that a GUI in themultiphysics modeling system 10230 communicates or interacts with adesign system user interface. The design system's user interface mayinclude a window that displays, for example, the multiphysics modelingsystem's model tree (see, e.g., FIGS. 103 and 110-120) and/or a windowcorresponding to the settings of a node for the model tree. Exemplaryaspects of a model tree are presented in more detail in FIGS. 103 and110-120. In certain embodiments, a model tree associated with themultiphysics modeling system that is displayed in a GUI can include thedisplay of nodes that represent modeling operations and the display ofbranches that represent the logical relationships between the nodes.

It is contemplated that in certain embodiments the bridge connection mayallow certain user input events 10222, 10232 such as mouse events,keyboard events, or other user input, to be sent from the designsystem's user interface to the multiphysics modeling system's model treeand/or a settings window displayed in the design system's userinterface. The multiphysics modeling system 10230 may also send commandsthrough the bridge connection 10210 to the design system 10220 using thedesign system's application programming interface (“API”). For example,the bridge connection 10210 may allow the multiphysics modeling system10230 to render its graphics inside a graphics window in the designsystem's user interface. The design system's user interface may thendisplay a view of a model geometry associated with the setup of amultiphysics problem. Selections 10224, such as those of geometricentities (e.g., domains, boundaries, edges, vertices) can also berequested from the design system's geometry by the multiphysics modelingsystem via the bridge connection 10210. User selections and/or selectionresults 10234 of geometric entities can be sent back and forth, throughthe bridge connection 10210, between the multiphysics modeling system10230 and the design system 10220.

In certain embodiments, the multiphysics modeling system's settingswindow(s) are configured to receive selection settings from the designsystem 10220 through the bridge connection 10210. As discussed above,the multiphysics modeling system 10230 may receive user inputs 10232,such as mouse events and keyboard events, through the design system'suser interface. In certain embodiments, the multiphysics modeling system10230 may be configured via rendering command(s) 10236 to rendergraphics directly in a graphics window 10226 of the GUI of the designsystem 10220. This rendering of graphics may occur in response to arequest from a user to show the results from the solution to amultiphysics problem or model. In certain embodiments, the multiphysicsmodeling system 10230 may receive the rendering request from the earlierdescribed user inputs 10232 (e.g., mouse events or keyboard events).

FIG. 103 illustrates an exemplary aspect of a bridge connection forexecuting portions of a multiphysics modeling system GUI within a designsystem user interface. The bridge connection may be established betweenthe design system and the multiphysics modeling system in response to arequest for such a connection being sent from the design system to themultiphysics modeling system. Once a bridge connection is established, adesign system user interface 10310 may also display a settings window10314 having a model tree 10322 associated with model(s) from amultiphysics model system 10320. In one embodiment, the model tree10322, in association with the bridge connection, can directly allow foruser inputs into the multiphysics model system 10320 via the designsystem user interface 10310.

The model tree 10322 can include nodes 10324 (e.g., Materials, Mesh 1)containing references 10326 to settings (e.g., Joule Heating,Electromagnetic Heat Source, Electric Insulation, Thermal Insulation,Initial Values, Electric Potential, Temperature, Convective Cooling) ofa multiphysics model and branches displaying relations between nodes.For example, a setting can include a description for a physicalquantity, a physical property, or a boundary condition associated withthe model. Model tree 10322 illustrates an exemplary setting of aboundary condition for convective cooling at a face of a multiphysicsmodel. The model settings for the face include an external temperatureand a heat transfer coefficient. In certain embodiments, a user of thedesign system can enter or select a node or face of the system beingmodeled from a geometrical display window 10312 in the design systemuser interface 10310. The entering or selection of a node or face canthen send an instruction, via the bridge connection, from the designsystem to the multiphysics model system to display in the settingswindow 10314 for the selected node. The multiphysics modeling system10320 can then send, again, via the bridge connection, a representationof the settings window for display in the design system user interface10310.

Certain settings may be associated with geometric entities of the model,such as a face for a boundary condition, and the multiphysics modelingsystem may prompt or send an instruction to the design system requestingthe selection of the geometric entity associated with the setting. Theprompt or request may occur using similar operations describedpreviously in FIGS. 98-102. In response to the entity selection, thedesign system user interface 10310 can then generate a correspondinggeometric entity in the multiphysics modeling system 10320. Therepresentation of the geometric entity can be displayed in the designsystem user interface 10310, such as in the geometrical display window10312 or in a window associated with a selected node or face. Thesettings of an entity can be entered as instructions using the settingswindow 10314. The instructions can include one or more selections ofdefault or custom items from the settings window 10314. The selectionsmay occur via user input received through a mouse, keyboard, or otheruser input device. In certain embodiments, the settings may beexpressions entered using a keyboard or the setting may be predefinedand selected from a window listing one or more of the predefinedexpressions. The input instructions can then be sent or transferred tothe multiphysics modeling system 10320. Based on the instructionsreceived from the design system, the multiphysics modeling system maythen interpret the instructions and execute commands for forming thecomponents of the multiphysics model described by the settings. Themultiphysics modeling system 10320 can then transmit the status of theexecuted setting(s) back to the design system, including, for example,any updates to geometrical display window 10312.

The bridge connection can facilitate any of several exemplaryassociations and/or communications between the multiphysics modelingsystem 10320 and the design system, such as those illustrated in FIG.103. For example, boundary conditions selections 10328, includingphysical quantities and properties, may be received by the multiphysicsmodeling system 10320 from the design system. FIG. 103 illustrates thereceipt by the multiphysics modeling system 10320 of boundary conditionselections 10328 including, for example, face selections, convectioncooling settings, and heat flux quantities for a model, via the designsystem user interface 10310. Furthermore, a user interface 10329associated with the multiphysics modeling system 10320 may receiveselection data via the boundary conditions selection(s) 10328 and inturn communicate the boundary condition(s) data via the bridgeconnection back to the design system, which then displays updatedinformation on the design system user interface 10310. The multiphysicsmodeling system 10320 may also determine various results based on theboundary condition selection(s) and also communicate those results forthe multiphysics model to the design system, which can display theresults on the design system user interface 10310. The communicatedresults can also be based on any physical entity or physics quantityassociated with the system being modeled. That is, FIG. 103 illustratesthe interactive nature and/or exchange of information between a designsystem (e.g., 9810, 9910, 10220, 10310) and a multiphysics modelingsystem (e.g., 9820, 9920, 10230, 10320) and how information may bedisplayed to a user on a GUI (e.g., 9810, 10310) associated with adesign system that is bridged to a multiphysics modeling system (e.g.,9820, 10320).

Other boundary condition selections are contemplated in addition tothose described above. For example, in a model having electromagneticproperties and quantities, boundary condition selections can includeground, current density, electric potential, distributed impedance,reflecting, absorbing, port, perfect electric conductor, etc. In a modelhaving structural mechanics properties and quantities, boundarycondition selections can include fixed constraint, roller, load,contact, displacement, free, etc. In a model having fluid properties andquantities, the boundary condition selections can include inlet, outlet,wall, free surface, pressure, etc. The foregoing boundary conditionselections are non-limiting examples of domain settings and boundaryconditions that can be selected and for which information can beexchanged between a design system and a multiphysics modeling system. Itis contemplated that these and other types of domain settings andboundary conditions would be understood to be exchangeable between thesystems depending on the scientific and engineering principles desiredto be modeled.

Referring now to FIG. 104, an exemplary aspect of the present disclosureis illustrated for dynamically controlling, via a bidirectional link anda bridge connection, parametric and geometric features in a designsystem. The steps shown in FIG. 104 can be implemented via amultiphysics modeling system GUI that is executed or displayed in adesign system user interface, similar to the user interface illustratedin FIG. 103. The steps shown in FIG. 104 include a series of stepsbetween the design system 10410 and the multiphysics modeling system10420 occurring over a communications path, such as the bidirectionallink and bridge connection described elsewhere herein.

Turning now to step 10452, a window or list of parameter definitions maybe generated by the multiphysics modeling system 10420 and transferredto the design system 10410. These communications may be facilitated viadynamic link library files described elsewhere herein. At step 10454,the parameter definitions are received and may be displayed and/oraccessed via the design system user interface. In certain embodiments,the display of the parameter definitions may occur as a multiphysicsmodeling system GUI displayed inside the design system's user interface.At step 10456, the list of parameters or parameter definitions may bereceived as instructions, sent via the bridge connection from the designsystem 10410 to the multiphysics modeling system 10420. At step 10456,the multiphysics modeling system 10420 may interpret the list ordefinitions before sending them to the design system. For example, themultiphysics modeling system may interpret the parameter definition tobe associated with geometric features. It is also contemplated that incertain embodiments material properties may be obtained from the designsystem. At step 10458, the design system 10410 may receive parametersthat are identified as parameters controlling geometric features. Thegeometric features can then be updated in the design system according tothe parameter definitions or values received from the multiphysicsmodeling system. At step 10460, the design system may update a geometricrepresentation of the model based on the updated geometric features.Furthermore, the design system may also generate a file containing thegeometric representation based on the updated geometric features. Atstep 10462, the generated file in step 10460 may be received or loadedinto the multiphysics modeling system and a representation of thegeometrical domain of the model can be updated. At step 10464, themultiphysics modeling system 10420 may then solve a multiphysics problemusing the updated geometrical domain for the system being modeled. Atstep 10456, the design system can receive results or solutionsassociated with the geometrical domain, where the results or solutionare determined from the file received at step 10462. The results orsolution can then be displayed in the design system's user interface.

Referring now to FIG. 105, another exemplary method is illustrated fordynamically controlling, via a bidirectional link, parametric andgeometric features between a design system and a multiphysics modelingsystem. At step 10556, a list of parameters or parameter definitions asdefined by the multiphysics modeling system may be sent from themultiphysics modeling system 10520 to the design system 10510 through abidirectional link, as illustrated and discussed, for example, in thecontext of FIGS. 99-102. At step 10558, these parameters are received bythe design system 10510 and may be identified by the design system asparameters controlling geometric features of the model. The geometricfeatures can then be updated in the design system according to theparameter definitions or values received from the multiphysics modelingsystem. For example, the value of a radius of a fillet associated withthe face of a model may be controlled or altered. At step 10560, thedesign system may update a geometric representation of the model basedon the updated geometric features. Furthermore, the design system mayalso generate a file containing the geometric representation based onthe updated or altered geometric features. At steps 10561 and 10562, thegenerated file in step 10560 may be automatically received or loadedinto the multiphysics modeling system and the representation of thegeometry sequence and geometrical domain of the model can be updated. Incertain embodiments, selected aspects of the parameter definitions fromstep 10556 may be directly sent to steps 10561 and 10562, such asparameter definitions that are unchanged (e.g., parts of the geometrythat are not changed) and thus do not necessarily need to be sent to thedesign system. At step 10564, the multiphysics modeling system 10520 maythen solve the multiphysics problem using the updated geometrical domainfor the model.

FIG. 106 illustrates another non-limiting exemplary aspect of thepresent disclosure for dynamically controlling, via a bidirectionallink, parametric and geometric features and associativity operations toset physical properties and boundary conditions in a multiphysicsmodeling system. The associativity operation at step 10663 is used toset the physical properties and boundary conditions in the multiphysicsmodeling system 10620. Beginning at step 10656, a list of parameters orparameter definitions as defined by the multiphysics modeling system maybe sent from the multiphysics modeling system 10620 to the design system10610 through a bidirectional link, as illustrated in discussed, forexample, in the context of FIGS. 99-102. At step 10658, these parametersare received by the design system 10610 and may be identified by thedesign system as parameters controlling geometric features of the model.In certain embodiments, the received parameters may control alreadyexisting geometric features. The geometric features can then be updatedin the design system according to the parameter definitions or valuesreceived from the multiphysics modeling system. At step 10660, thedesign system may update a geometric representation of the model basedon the updated geometric features. Furthermore, the design system mayalso generate a file containing the geometric representation based onthe updated or altered geometric features. At steps 10661 and 10662, thegenerated file in step 10660 may be automatically received or loadedinto the multiphysics modeling system and the representation of thegeometry sequence and geometrical domain of the model can be updated. Incertain embodiments, selected aspects of the parameter definitions fromstep 10656 may be directly sent to steps 10661 and 10662, such asparameter definitions that are unchanged and thus do not necessarilyneed to be sent to the design system.

In certain embodiments, the method of FIG. 106 may proceed directly tostep 10664, where the multiphysics modeling system 10620 solves themultiphysics problem using the updated geometrical domain for the model.However, the multiphysics modeling system 10620 may instead proceed fromstep 10662 to step 10663 where the multiphysics modeling system may useassociativity to reuse settings for the physical properties and boundaryconditions from a previous formation of a multiphysics problem and applythose reused settings for the formation and solution of the multiphysicsproblem using the updated geometrical domain. The associativityoperation at step 10663 may include mapping geometric entities (e.g.,domains, faces, edges, vertices) between the old or previous geometricaldomain and the new geometrical domain. The geometrical domain may bedefined by a geometry sequence containing geometric objects andgeometric operations. For example, a new geometric object (e.g., parentobject) may be constructed from a number of child geometric objects(e.g., a number of other geometric objects). For each such parent, theremay be a mapping between geometric entities in the parent object and inthe child object. In particular, when a new geometric representation isloaded into a multiphysics modeling system through a bidirectional link,the bidirectional link may provide such a mapping between the geometricentities of the old object and the new object. This mapping may beconstructed by asking the design system for the mapping between thegeometric entities. It is contemplated that during the updating of thegeometrical domain, some or all selections of geometric entities may beupdated by applying the mapping between geometric entities of the oldand the new geometrical domain. This mapping may be used to set physicalproperties and boundary conditions for the multiphysics problem.

A preliminary step in the associativity mapping process may includefinding a minimal set of common ancestors of the old and the newfinalized geometrical object. A next step may be to compute mappings ofgeometric entities from the common ancestors to the geometric objects,for example, by composing the mappings for the chain of parents orancestors relating the objects. The mappings may then be composed to geta mapping from the new finalized geometrical domain to the oldgeometrical domain. The mapping may then be improved by applying someexperience-based techniques that are based on adjacencies betweenentities of different dimensions. An example of the associativitymapping process may include having an object that is the result of achange that is done on an original object. The resulting object wouldhave the original object as an ancestor such that the resulting objectinherits the settings of the original object or ancestor. For example,if the original object were a rectangle, the change could be roundingone of the corners of the rectangle. In the associative mapping process,the multiphysics modeling system can map the exemplary boundaryconditions from the original rectangle to the rectangle with the roundedcorner. Next, another change can be made to the object, such as roundinganother corner of the rectangle. Further applying the associativemapping process, the multiphysics modeling system can then map or trackfrom the first rectangle with one rounded corner up to the ancestorwithout rounded corners and then down to the rectangle with the tworounded corners. Thus, by this process of associativity mapping, themultiphysics modeling system can track objects up and down a geometrysequence in order to relate physical settings to new objects that mayreuse portions of the original geometry sequence.

It is contemplated that in certain embodiments the method of FIG. 106may be used for a multiphysics problem to optimize a value of aparameter associated with a geometric feature. The value may beoptimized using an objective function that accords with certain designcriteria for the product being modeled or optimized. For example, themultiphysics modeling system may use an optimization algorithm to searchfor an optimal value based on the objective function. As the search forthe optimal value progresses, the optimization algorithm may need toevaluate an objective function for updated parameter value(s). Theupdated value(s) can then be sent back to a design system, which maythen update a geometric representation. The updated geometricrepresentation may then be used by the multiphysics modeling system toupdate the geometrical domain. The multiphysics modeling system can thencompute a new solution to the multiphysics problem along with newupdate(s) to the parameter value(s) based on the updated geometricaldomain. The multiphysics modeling system can then determine whether torepeat the process based on the initial design criteria. That is, asillustrated between steps 10664 and 10656, the iterative process or loopcan be repeated a single time or as many times as is necessary to meetthe design criteria and that can be supported by the computingcapabilities of the multiphysics modeling system processor(s).

Referring now to FIG. 107, an exemplary GUI is illustrated for themultiphysics modeling system that may be displayed for dynamicallycontrolling features between the multiphysics modeling system and adesign system via a bidirectional link. The GUI may include parameternames (e.g., Rad1) and their associated values (e.g., R1). The parameternames are shown to be defined in a settings window that may be accessedby selecting a feature or icon from the graphical representation of thebidirectional link in the multiphysics modeling system. The parameternames may refer to names of parameters that control geometric featuresin the design system. The geometric features in the design system maythen be updated according to the parameter values in the multiphysicsmodeling system by selecting an icon associated with a synchronizefeature between the multiphysics and the design systems.

It is contemplated that in certain embodiments it may be desirable todefine variations for parameters that control, for example, thegeometric features of a model. Referring now to FIG. 108, an exemplaryembodiment is illustrated for defining variations for parameters thatcontrol geometric features in a design system. The variations aredefined via a multiphysics modeling system 10820 that is incommunication with the design system 10810 through a bidirectional link.In certain embodiments, a bidirectional link may be complemented by abridge connection that allows a multiphysics modeling system to beaccessed from a window in a design system GUI, as described elsewhereherein.

At step 10852, a window for entering parameter list(s) may be generatedby the multiphysics modeling system 10820 and transferred to the designsystem 10810 through the bidirectional link. For example, parametersdescribing geometric features, such as a radius or length, or materialproperties, such as tensile strength or density, associated with adetail of a model may be generated and transferred through thebidirectional link. At step 10854, the parameter lists defined orentered are received and may be displayed in the design system userinterface. In certain embodiments, the display of the parameterdefinitions may occur as a multiphysics modeling system GUI displayedinside the design system's user interface. The lists may be received asinstructions, and in certain embodiments, these instructions may be sentvia the bridge connection of a bidirectional link from the design system10810 to the multiphysics modeling system 10820. The list or definitionsmay be interpreted before being sent to the design system. For example,the multiphysics modeling system may interpret the parameter definitionto be associated with geometric features. In certain embodiments, theinterpretation of the lists may be completed in the design system. Eachlist of parameters may represent a variation of parameter values to beused in solving a model. At step 10858, the parameters are identified asparameters controlling geometric features. The geometric features canthen be updated in the design system according to the values of theparameters in each list. At steps 10860 a, 10860 b, 10860 c, the designsystem updates geometric representations for each list of parameters forthe model variations based on the updated geometric features.Furthermore, the design system may also generate a file for each list ofparameters, where each file contains the corresponding geometricrepresentation. At steps 10862 a, 10862 b, 10862 c, each generated filein step 10860 a, 10860 b, 10860 c may be received or loaded into themultiphysics modeling system and representations of the geometricaldomains of the model variations can be updated. At step 10864 a, 10864b, 10864 c, the multiphysics modeling system 10820 may then solve themultiphysics problems using the updated geometrical domains for thesystem variations being modeled. At steps 10866 a, 10866 b, 10866 c, thedesign system receives the results or solutions associated with each ofthe geometrical domains determined from the files received at steps10862 a, 10862 b, 10862 c. The multiphysics modeling system can createone solution set for each variation of the geometrical domain. Thesolutions can then be displayed in the design system's user interface.On the lower end, it is contemplated that as few as two variations canbe modeled and results be determined. On the upper end, while only threegeometric representations and domains are illustrated, this is forexample purposes only. That is, more than three lists of parameters andgeometric representations and lists of parameters can be input into thesystems described herein such that a user can determine the desiredmodel variations.

It is contemplated that in certain embodiments, the multiphysicsmodeling systems described herein may use the concept of associativityto set the physical properties and boundary conditions specified for onegeometrical domain and reuse these settings for each variations of thegeometrical domain. Associativity may be achieved by mapping geometricentities (domains, faces, edges, vertices) between an old or previousgeometrical domain and a new or to-be-varied geometrical domain. Whenthe new or varied geometric representation is received or loaded intothe multiphysics modeling system through a bidirectional link, thebidirectional link may provide the mapping between the geometricentities in the old object and the new or varied object. In certainembodiments, this mapping may occur by the multiphysics modeling systemprompting or requesting the design system for the physical propertiesand boundary conditions from the old object. When updating thegeometrical domain, all selections of geometric entities can be updatedby applying the mapping between geometric entities in the old and thenew geometrical domains. The mapping may then be used to set physicalproperties and boundary conditions for a multiphysics problem that is tobe solved by the modeling system. The multiphysics modeling system canthen solve the problem using each of the updated geometrical domainscorresponding to the variations in geometric features. The multiphysicsmodeling system can then determine one solution dataset for eachvariation in geometrical domain. The solutions mapped on a correspondinggeometrical domain can then be sent by the multiphysics modeling systemto the design system, where the solutions are then displayed in thedesign system's user interface with each variation in geometricaldomain.

Referring now to FIG. 109, an exemplary GUI is illustrated for definingvariations of parameter(s) that control the geometric features in adesign system, from a multiphysics modeling system, using abidirectional link. In certain embodiments, the parameter names in themultiphysics modeling system may also refer to names of parameters thatcontrol the geometric features in the design system. The parametervalues may be varied according to an interval having certain boundaries,such as a minimum value and a maximum value, plus an increment forvalues in between. Each parameter value may be contained in a separateparameter list in the multiphysics modeling system that is then sent tothe design system for automatic synchronization and generation of thefiles that contain the design system's geometric representation for eachvariation. One exemplary aspect of the present disclosure includes amethod for accessing settings for forming and solving multiphysicsproblems in a multiphysics modeling system from a design system userinterface. The solution of a multiphysics problem is displayed in thedesign system user interface.

Another exemplary aspect of the present disclosure includes a method forestablishing and maintaining a bidirectional link between a CAD systemand a multiphysics modeling system for communicating commands involvinggeometric features.

Yet another exemplary aspect of the present disclosure includes a methodfor establishing a bridge connection between a CAD system and amultiphysics modeling system for communicating commands involvingsettings in a multiphysics problem.

A further exemplary aspect of the present disclosure includesmultiphysics software (e.g., algorithms or instructions configured to beexecuted on a processor) that is able to run parts of its GUI inside aCAD system user interface using a bridge connection. The settings for amultiphysics problem, such as physical properties and boundaryconditions, can be accessed from a representation of the multiphysicsproblem in the form of a model tree in the CAD system user interface.

Another exemplary aspect of the present disclosure includes a method fordynamically controlling the parametric and geometric features in a CADsystem from parts of a multiphysics modeling system's GUI run in the CADsystem user interface via a bidirectional link and a bridge connection.The parametric and geometric features of the CAD system are expressed interms of parameters in the parts of the multiphysics modeling systemthat are accessed in the CAD system's user interface. The CAD systemdynamically returns a geometric representation, which is automaticallyloaded by the multiphysics modeling system and a geometrical domain ischanged accordingly. The multiphysics modeling system can be configuredto define and solve the multiphysics problem for the geometrical domain.For example, a dynamic-link library (DLL) file may be used, which is anexecutable file that allows programs to share code and other resourcesnecessary to perform particular tasks.

Yet another exemplary aspect of the present disclosure includes a methodthat defines a variation of a geometrical domain using sets ofparameters that control the geometric features in a CAD system fromparts of a multiphysics modeling system GUI run in the CAD system userinterface via a bidirectional link and a bridge connection. The CADsystem can return a modified geometric representation of the variations,which can be automatically loaded in the multiphysics modeling system.Each geometric representation corresponds to a variation and onegeometrical domain is defined for each set of parameters. Themultiphysics modeling system can then define and solve a multiphysicsproblem for each geometrical domain.

Another exemplary aspect of the present disclosure includes a methodexecuted on a computer system for establishing a bidirectional linkbetween a CAD system and a multiphysics modeling system. The methodincludes detecting one or more installed CAD systems, communicatingcommands between the multiphysics modeling system and the one or moreCAD systems, and representing the bidirectional link as a geometricoperation in a geometry sequence in the multiphysics modeling system.

In further exemplary aspects of the present disclosure, the method forestablishing the bidirectional link includes loading dynamic linklibraries for each of the detected one or more CAD systems. The dynamiclink libraries can be used for communicating the commands. The methodmay further include using the commands to generate files containing ageometric representation in the CAD system. The method can additionalinclude generating a geometrical domain in the multiphysics modelingsystem using the files containing the geometric representation and thegeometry sequence. The method may further include defining amultiphysics problem using the geometrical domain.

In yet further exemplary embodiments of the present disclosure, themethod for establishing bidirectional links can also include sending viathe bidirectional link the parameters from the multiphysics modelingsystem describing geometric features in the CAD system. The method canalso include sending via the bidirectional link the parameter listsrepresenting variations in the geometric features. The method mayfurther include specifying physical properties and boundary conditionsin the multiphysics modeling system for each of the variations usingassociativity.

FIGS. 110-120 illustrate various exemplary aspects of a model treeincluding logical relationships between various exemplary nodes that maybe included in a method for forming and solving a multiphysics problemin a multiphysics modeling system. It is contemplated that in certainaspects the model tree is presented in a GUI of a multiphysics modelingsystem, or in a window associated with the modeling system where thewindow is display in the GUI of a design system (see, for example, FIG.98 or 103), such as a CAD system. A model tree can include selectablenodes, which when selected, display or allow input of differentoperations or parameters for the multiphysics modeling system. It isalso contemplated that the results of different modeling operations canalso be represented in nodes of the modeling tree.

It is contemplated that a model tree, such as in the exemplary aspectsdisclosed herein, can be desirable because it provides a graphicalprogramming environment for developing multiphysics problems in amultiphysics modeling system. As discussed above and elsewhere herein, amodel tree includes nodes and branches. The nodes represent variousmodeling operations and the branches represent the logical relationshipbetween the operations represented by the nodes.

It is contemplated that it may be desirable to represent sequence(s) ofmodeling operations as nodes in a model tree. The model tree nodes maythen be used to generate the constituents of a multiphysics problem thata user desires to model. The constituents of the problem being modeledcan include, among other things, a geometrical domain, physicalquantities, physical properties (e.g., mechanical, electrical, magnetic,thermal), boundary conditions, mesh, solver configurations, and resultsor solutions of the multiphysics model. In certain embodiments, asequence of modeling operations may be structured to include one or morechild nodes (e.g., subnodes) that branch from a parent node (e.g.,primary node) representing a constituent of a multiphysics problem. Thebranches in the model tree can be used to represent the logicalrelationship between the parent and child nodes. For example, a systemto be modeled may include one or more model nodes (e.g., a parent node)and under each of those model nodes there may be a geometry node,material node(s), physics node(s), and a mesh node (e.g., child nodes).Furthermore, one or more of the child nodes may also have their owngrandchild nodes for adding contributions to the physical quantitiesassociated with the associated child node.

It may also be desirable in a multiphysics modeling system to generatepartial differential equations that describe certain physical quantitiesin a multiphysics problem. For example, in certain embodiments, apartial differential equation for a multiphysics problem may begenerated by adding contributions to a system of partial differentialequations rather than changing an existing set of generic system(s) ofpartial differential equations. Such a process can provide efficienciesto the generation of partial differential equations. In one exemplaryaspect, operations may be included as nodes in the model tree for addingthe contributions to the partial differential equations. The model treemay include a parent node for physics elements, and the parent node mayinclude a child node or branch for adding contributions to the partialdifferential equations associated with the problem being modeled. Amodel tree and node approach can be desirable because it providesclarity to the user of the multiphysics modeling system during the setup and modification of the various constituents of the problem beingmodeled.

In a multiphysics modeling system it may further be desirable to addcontributions to a multiphysics problem by attributing the addedcontributions to a geometrical domain. The benefit can include thatcontributions are only defined when needed and any generic equations,that by default are associated with all the geometric domains, do notneed to be altered or removed.

In a multiphysics modeling system it may further be desirable to have amodel tree that has nodes for more than one model (see, e.g., FIG. 120)such that several components in a system can be simultaneously modeledtogether. The individual models can share certain model inputs orparameters when the models are simulated simultaneously during theprocessing of a multiphysics problem.

Numerous exemplary and non-limiting aspects of a model tree for amultiphysics modeling system are discussed in more detail below.Furthermore, an exemplary multiphysics modeling system includes theCOMSOL® 4.0 or COMSOL Multiphysics® simulation software operating on acomputer system, as such software is available from COMSOL, Inc. ofBurlington, Mass. Additional exemplary aspects of multiphysics modelingsystems are described in U.S. patent application Ser. No. 10/042,936,filed on Jan. 9, 2002, now issued as U.S. Pat. No. 7,596,474, U.S.patent application Ser. No. 09/995,222, filed on Nov. 27, 2001, nowissued as U.S. Pat. No. 7,519,518, and U.S. patent application Ser. No.09/675,778, filed on Sep. 29, 2000, now issued as U.S. Pat. No.7,623,991, each of which are hereby incorporated by reference herein intheir entirety.

A model tree for a multiphysics modeling system can include a globaldefinitions node for creating or inputting model parameters, variables,and function that have a global scope, and thus, are not specific to aparticular model branch. The model tree can further include one or moremodel nodes, a study node, and a results node. The model node(s) can beused to set up a system or component to be modeled, and the input or setup can be done, for example, as a two-dimensional simplification of thecomponent or system. Other exemplary model node(s) can be input or setup with a full three-dimensional description. The study node can be usedto set up the simulation(s) of the whole multiphysics model or portionsthereof, and can be applied for one or more models as set up using themodel node(s). The results node can then be used to further investigateand review the solution received from the study node.

FIG. 110 illustrates an exemplary embodiment of a process for generatinga model tree within a multiphysics modeling system. At step 11010, awindow displayed on a GUI (e.g., a monitor) can be configured to allowthe system user to select a space dimension for a model. For example,the user can choose from several selectable options or be allowed toprovide inputs for the space dimensions of a model, including dimensionsfor three-dimensional, two-dimensional, two-dimensional axisymmetric,one-dimensional, one-dimensional axisymmetric, or zero-dimensionalmodel(s). The selection or receipt of space dimension input(s) can thenbe used to determine and display a physics list at step 11020. Thechoices or options available on for a physics list can vary depending onthe space dimension input(s) selected in step 11010. The physics listthat is displayed in step 11020 can be displayed in a window of the GUIassociated with the multiphysics modeling system. Each of the physicschoice(s) or option(s) can include descriptions and equations for avariety of engineering or scientific disciplines, such as thosedescribed elsewhere herein (e.g., joule heating and thermal expansion,solid mechanics, electrical circuits), which can be modeled in themultiphysics modeling system. It is further contemplated that a user caninput or define a customized physics for use in determining the solutionto the model. At step 11030, a user may then select the desired one ormore physics to be applied and simulated for the model(s). The selectionof the physics at step 11030 determines a set of physical quantitiesassociated with the received selection that are available for furthermanipulation in a multiphysics problem. The selection of the physics atstep 11030 can also implement the selection of predefined studies and/ornumerical preferences associated with a given physics. At step 11040,the system displays a study list, including one or more study options,in a window of the GUI. At step 11050, the user can select a study fromthe list displayed in step 11040. The various selections available inthe study list can include, for example, stationary, time dependent,eigenfrequency, or some other study type that would be known in thefield of the system being simulated in the multiphysics modeling system.Finally, at step 11060, the multiphysics modeling system can generate amodel tree based on the input received from the system user via themodel tree.

In certain embodiments, the selection of a space dimension in step 11010can be used to determine the name(s) and icon(s) of model node(s)available in a model tree. The selection of the space dimension canfurther determine the content in the setting(s) that may be accessed inthe model tree by a system user. In certain embodiments, the selectionof physics at step 11030 can also determine certain default content of aphysics branch in a model tree and the available setting in thedifferent nodes. Further, it is also contemplated that the selection ofthe study at step 11050 may determine the content of one or severalstudy steps that may be included in the study node.

Turning now to FIG. 111, an exemplary aspect of a process is illustratedfor forming and solving a system of partial differential equations in amultiphysics modeling system based on operations represented in a modeltree. The model tree for the multiphysics model that is generated, suchas for the exemplary process illustrated in FIG. 110, can include amodel node, a study node, and a results node. The model node may includea plurality of child nodes, such as a geometry node, material node(s),physics node(s), and mesh node(s). The study node can also include childnodes associated with solving the multiphysics problem.

At step 11110, a geometric representation is generated by themultiphysics modeling system based on operations associated with childnodes to the geometry node. For example, selection of the geometry nodemay display various child nodes that allow a user to execute additionaloperations associated with the geometry node and the generation of thegeometric representation in step 11110. It is also contemplated that thegeometry of the model or problem to be solved may be imported into thegeometry node, such as from a computer-aided design file or throughassociations between a computer-aided design system and a multiphysicsmodeling system, as described elsewhere herein (see, e.g., 98-109).

At step 11120, physical properties are assembled by the multiphysicsmodeling system for the domains contained in the geometricrepresentation generated in step 11110. These physical properties areassociated with the materials node(s) in the model tree, which includethe material properties for all the physics and all the domains in oneor more model node(s). In certain embodiments, the materials node caninclude specific material(s) (e.g., cast iron, concrete, titanium) thatare selectable by a user for the system(s) or component(s) beingmodeled. Depending on the complexity of the system being modeled, thesystem may have multiple components or elements each having differentmaterial properties that can be assembled in step 11120.

At step 11130, the multiphysics modeling system assembles the physicsquantities and boundary conditions based on the representations ofoperations associated with one or more physics nodes of the multiphysicsmodel. The assembled physics quantities and boundary conditions may bedefined in the domains contained in the geometric representation usingthe physics properties determined from the operations represented in thematerials node.

At step 11140, a mesh is generated by the multiphysics modeling systemfor the geometric representation and is based on the representations ofthe operations in the mesh node. For example, a system user may selectto execute the mesh operations in a menu displayed by clicking orselecting the mesh node. In one exemplary and non-limiting embodiment,the system user may select to create an unstructured tetrahedral meshfor a component being modeled. Other non-limiting examples of mesh typesmay include prism, pyramids, swept, boundary layer, hexahedral, surface(e.g. for shells), and edge meshes (e.g., for beams). Other meshgeometries known in the field of the present disclosure are alsocontemplated.

Next, at step 11150, the multiphysics modeling system may proceed withthe compilation and discretization of equations for all the study stepsselected in the study node for each of the model(s). As discuss above, astudy node may contain a representation of study steps for a solution toa set of partial differential equations. The study node can includechild nodes for compiling the partial differential equations for eachstudy step. Furthermore, the study node may include child nodesrepresenting the discretization and solution sequence for the equationsfor each study step.

A system user may select to execute the operations represented by thechild nodes in the study step from a menu (e.g., a drop-down menu)displayed after selecting the study node. The menu may be displayed byclicking on or selecting the study node as it is displayed in a GUI. Theexecution of the study steps may involve compiling a set of partialdifferential equations based on the physics quantities and boundaryconditions generated by the physics, and based on the analysis selectedfor the study step, such as whether to implement a transient (e.g.,dynamic) or stationary (e.g., static) analysis. The equations arediscretized based on the meshed geometric representation. Then, at step11160, discretized equations from step 11150 may be solved using asolver represented by child node(s) of the study node.

In certain embodiments, the multiphysics modeling system may be solvinga multiphysics problem including a plurality of model nodes withcorresponding geometry, materials, physics, and mesh child nodes.Furthermore, each of the plurality of model nodes may be used togenerate a corresponding part of the set of partial differentialequations in the multiphysics problem. It is contemplated that thecomplete set of partial differential equations may be compiled,discretized, and solved in steps 11150 and 11160, for different studysteps, by solvers represented by child nodes to the study node. Thecompiling, discretization, and solving of the partial differentialequations can be completed automatically through the execution of aseries of processes in the multiphysics modeling system, without theneed for any further user inputs.

At step 11170, the results of the solution to the multiphysics problemmay be generated and displayed or otherwise output for later display oruse. For example, the solution to a multiphysics problem may bevisualized or prepared for display according to the operationsrepresented by one or more child nodes associated with the results node.Such an operation may include the generation of one or more graphs of aset of results, which may be generated by clicking or selecting aresults node that implemented a predetermined or customized set ofoperations for preparing the display of the results.

Turning now to FIG. 112, an exemplary aspect of a model tree 11200 isillustrated for forming and solving multiphysics problems in amultiphysics modeling system. In certain embodiments, the model tree11200, or variations thereof based on different modeling features, ispresented on a GUI associated with a processor configured to execute themultiphysics modeling system. It is also contemplated that model tree11200 may be presented in a window on a GUI for a design system, wherethe window is associated with the multiphysics modeling system operatingon the same or a different processor implementing routines associatedwith the design system.

Model tree 11200 may include different configurations and differentfeatures represented as logically arranged nodes associated withsimulating a multiphysics problem. For example, a primary node 11210(e.g., thermal_actuator_tem.mph) may represent the multiphysics problemfor which a solution and results are desired. Node 11210 is exemplifiedto include four child nodes including global definitions node 11220(e.g., Global Definitions), model node 11230 (e.g., Thermal Actuator),study node 11260 (e.g., Study 1), and results node 11270 (e.g.,Results). Each of nodes 11220, 11230, 11260, 11270 may have their ownadditional child nodes, which in turn may also have their own respectivechild nodes, such that a branch of various logically associated nodesare built from the primary node 11210 for model tree 11200.

The exemplary child node (e.g., Parameters) branching from the globaldefinitions node 11220 may represent operations that generateparameters, variables, and/or functions that apply to the entiremultiphysics problem being solved, and thus, operations that are notgenerally attributable to specific geometric entities, domains,boundaries, edges, or vertices. The operations represented by the childnodes (e.g., Parameters) can be considered global to multiphysicsproblem represented in model tree 11200. For example, a parameter fromthe child node illustrated for node 11220 may be used to define ageneral physical constant and may be utilized in a plurality or even allthe nodes in a model tree.

The exemplary child nodes (e.g., Definitions, Geometry 1, Materials,Joule Heating and Thermal Expansion, Mesh 1) branching from the modelnode 11230 (e.g., Thermal Actuator) may represent operations thatgenerate a geometrical domain node (e.g., Geometry 1), physicalproperties node 11240 (e.g., Materials), physics node 11250 (e.g., JouleHeating and Thermal Expansion), and/or a mesh node (e.g., Mesh 1). Incertain embodiments, the exemplary model node 11230 may generate partialdifferential equations for the mesh and/or the geometrical domain, orpartial differential equations associated with the geometrical domain.The partial differential equations can be formed using the physicalproperties node 11240 and/or physics node 11250, which may includeadditional child nodes for physical quantities and boundary conditions.In the exemplary embodiment illustrated in FIG. 112, the physics node11250 is described as Joule Heating and Thermal Expansion, though itwould be understood that other engineering and scientific phenomenacould be simulated, as well (e.g., acoustics, chemical reactions,diffusion, electromagnetics, fluid dynamics, geophysics, heat transfer,porous media flow, quantum mechanics, structural mechanics, wavepropagation, microelectromechanical systems, semiconductor systems,plasmas).

Operations for solving the partial differential equations, such as thoseassociated with the model node 11230, can be selected from child nodesbranching from the study node 11260 (e.g., Study 1). The study node11260 can include one or more study steps. For example, in a first studystep (e.g., Step 1: Stationary 1), partial differential equations may besolved at stationary or static conditions while a second step may followwhere these partial differential equations may be solved fortime-dependent or dynamic conditions. The study node 11260 may thereforecontain operations that add or remove terms in partial differentialequations, according to how each step may be defined. It is alsocontemplated that a study node may include child nodes representingoperations for solving partial differential equations using a finiteelement solver (e.g., Solver Configurations).

A branch from the primary node for a multiphysics problem can alsoinclude a results node 11270, which may further include additional childnodes representing operations for generating simulation results forsolution(s) to the multiphysics problem that are transformable to apredetermined or customized format presentable to the user of amultiphysics modeling system. For example, the child nodes may includeresults presented in table formats, as derived values, as variousmulti-dimensional plots, or as reports including combinations of resultformats such as graphics, numbers, and text.

Referring now to FIG. 113, an exemplary aspect of a child node (e.g.,Joule Heating and Thermal Expansion) is illustrated that branches froman exemplary model node of a model tree. The physics node 11350 includesoperations for generating physical quantities 11358 and boundaryconditions 11356 for a multiphysics problem, and can be associated withoperations for modeling various physics phenomena, such as thosedescribed elsewhere herein. Settings for the various illustrated nodescan be accessed and modified by selecting the desired node. For example,the first three child nodes 11352 of the physics node 11350 mayrepresent a sequence of modeling operations that generates defaultphysical quantities for structural displacements, electric potential,and temperature in a geometrical domain. The physical quantities aregenerated by operations that define thermal expansion (e.g., ThermalLinear Elastic 1 node), conduction of electric current and transport ofheat (e.g., Joule Heating Model 1 node), and resistive heating caused bythe electric current (e.g., Electromagnetic Heat Source 1 node). Theoperations generate the default partial differential equations shown forthe respective nodes in a selected geometrical domain. The partialdifferential equations illustrated in FIG. 113 provide exemplaryparameters that may be associated with the system being modeled, such asdensity, ρ, a displacement vector, u, and a stress tensor, σ. Theexemplary components of the stress tensor, σ, are functions of thederivatives of the displacement vector. Other exemplary materialparameters can include specific heat capacity, C_(p), temperature, T,thermal conductivity, k, electric potential, φ, and electricalconductivity, κ. These physical quantities may be set to an initialvalue, as illustrated in the exemplary mathematical relationships ofFIG. 113. For different model(s), different parameter(s) may be useddepending on the engineering or physics phenomenon(a) beingsimulated—the illustrated physical properties are provided by way ofexample only, and thus, are non-limiting.

The fourth, fifth, and sixth child nodes 11356 of the physics node 11350may represent a sequence of modeling operations that generate thedefault boundary conditions for the multiphysics problem. For example,default boundary conditions may be generated by the operations thatdefine the gradient in the electric potential by setting electriccurrent to zero in the “Electrical Insulation 1” node, the gradient ofthe temperature by setting the heat flux to zero in the “ThermalInsulation 1” node, and the structural constraints by setting noconstraints on the structural displacement at the boundaries in the“Free 1” node. The modeling operations can include generating defaultequations for the physical quantities interactions at the selectedboundaries.

The last exemplary child node 11358 (e.g., Initial Values 1) representsan operation that sets the initial values for all physics quantities,which in the exemplary illustration of FIG. 113 includes temperature,electric potential, and structural displacements. In certainembodiments, the operation may be required as an initial condition for atime-dependent simulation or as an initial guess in a stationarynonlinear simulation. The operation can generate equations for thephysical quantities at an initial stage in a selected geometrical domainand may be required by methods that solve partial differentialequations.

Referring now to FIG. 114, an exemplary aspect of a window 11452 isillustrated for a model node of a model tree for entering settings thatdefine model operations for a multiphysics problem. More specifically,an exemplary window is illustrated for entering accessed settings forthe exemplary Thermal Linear Elastic child node (see, e.g., element11352 in FIG. 113). Again, the illustration is non-limiting anddemonstrates the flexibility of the model tree for accessing and settingfeatures of the multiphysics modeling system. FIG. 114 includes anexemplary settings window 11452 that is associated with physicalquantities for structural displacements that may occur in the modelingof thermal expansion in a selected geometrical domain of a multiphysicsproblem. In certain embodiments, default physical properties, such asmaterial properties, may be linked to a materials node (see, e.g.,material node 11240 in FIG. 112) or a user may manually enter thephysical properties. For example, settings window 11452 includesdifferent fields for parameters that can be applicable for generating acontribution to a set of partial differential equations from the ThermalLinear Elastic 1 child node. It is contemplated that the settings window11452 may define material properties that are then used in generating anode contribution to the partial differential equations for a selectedgeometrical domain in a multiphysics problem. In the example of FIG.114, the material properties may include Young's modulus, E, Poisson'sratio, ν, density, ρ, and/or the coefficient of thermal expansion, a, ofa material. Applying the exemplary material properties, a nodecontribution can then be generated as a function of the physicalquantities, which for the exemplary embodiment, may be expressed asdisplacement vector, u. Again, as discussed elsewhere, for differentmodels, different parameters may be used depending on the physicsphenomena being simulated—the illustrated material or physicalproperties are provided by way of example only, and thus, arenon-limiting.

In certain embodiments, it is also contemplated that the setting windowalso displays informational aspects about certain operations in themodel tree. For example, information about the author or the source ofthe operation represented by a particular node in the model tree may bepresented or be selectable in the setting window. The setting window mayalso present information about the date and time (e.g., entry of certaininformation, running a certain model) or comments regarding theoperations about the selected node.

Referring now to FIG. 115, an exemplary aspect of a physics node 11552associated with a model node is illustrated. The exemplary physics node11552 has additional nodes 11553, 11554 for describing selected physicalquantities for a multiphysics problem. For example, a stress-strainrelationship, similar to the one illustrated in FIG. 114, may be alteredthrough the addition of stress tensor, a. The node denoted “InitialStress and Strain 1” may change an operation that sets the contributionof the “Thermal Linear Elastic 1”, by changing the stress-strainrelationship in a selected geometrical domain. More generally, thesequence of operations can be altered in a multiphysics problem byadding a node further describing certain physical quantities. In certainembodiments, the operation at node 11554 may also change the equationsof the physical quantities, such as for the structural displacements,while keeping other equations unchanged. A sequence of operations may beupdated by a user by selection of a node, such as node 11554, which maythen generate corresponding change(s) in partial differentialequation(s) that solve the multiphysics problem. Again, as discussedelsewhere, for different models, different parameters may be useddepending on the physics phenomena being simulated—the illustrated nodesare provided by way of example only, and thus, are non-limiting.

Referring now to FIG. 116, another exemplary aspect of a physics node11650 in a model tree is illustrated. In this aspect, an operationrepresenting contributions to physical quantities is illustrated. Forexample, child node 11653 (e.g., Heat Source 1) may represent anoperation that adds a contribution to a partial differential equationfor a physical quantity, such as temperature, in a selected geometricaldomain. As FIG. 116 illustrates, the exemplary partial differentialequation also includes the temperature contributions represented by theequations from Joule Heating Model 1 and Electromagnetic Heat Source 1.In certain embodiments, child nodes, such as node 11653, may be added bya user to generate contributions for all or some of the physicalquantities, such as structural displacements and electric potential, asillustrated in the exemplary physics node 11650 (e.g., Joule Heating andThermal Expansion). Again, as discussed elsewhere, for different models,different parameters may be used depending on the physics phenomenabeing simulated—the illustrated nodes are provided by way of exampleonly, and thus, are non-limiting.

Referring now to FIG. 117, an exemplary aspect of a window for addingcontributions to the physical quantities associated with a physics nodeof a model tree is illustrated. A menu box 11755 can be displayed nextto a physics node 11750 (e.g., Joule Heating and Thermal Expansion) inresponse to a system user providing a predetermined input, such as aright-click via a mouse. The menu box 11755 may contain menu items thatallow contributions to be added to equations in geometric entities, suchas domains, boundaries, edges, and points. In the exemplary aspect, aHeat Source node 11753 contribution may be associated with a heattransfer option in the menu box 11755. For example, by selecting HeatSource node 11753, a contribution may be added to a partial differentialequation for temperature in a selected geometrical domain, asillustrated, for example, in FIG. 116. It is contemplated that otherselected contributions may be added to other geometric entitiesdepending on the selections made by the multiphysics modeling user. Theaddition of contributions may also be predetermined as part of asequence of operations indirectly associated with other modelselections.

It is contemplated that in certain aspects of the present disclosure itmay be desirable for a multiphysics modeling system to label orotherwise identify nodes of a model tree that represent certainoperations that generate contributions to equations associated with ageometrical domain. For example, selecting a node can that represents aload may label or highlight other nodes in the model tree that coexistwith that load on any of the load's geometric selections (e.g., domain,boundary, edge, point). A label associated with a non-exclusive node canbe used where the operation can coexist with other contributions. If anode represents a contribution that cannot coexist with other nodes on ageometric selection, it can be understood to be an exclusive node. Incertain aspects, a last or final node in a sequence may be ableoverwrite the previous node(s) for the geometric selections where thenodes overlap.

Turning now to FIG. 118, an exemplary model tree is illustrated having aplurality of model nodes that include the identification of exclusiveoperation(s) associated with a selected node. The exemplary multiphysicsmodel is based on simulating the structural aspects of a structure, suchas an actuator, but can be readily applied to any of numerous physics orengineering phenomena. Exemplary Model 1 node includes a physics node11810 that includes physics quantities and boundary conditionsassociated with solid mechanics aspects of the virtual structure. Incertain exemplary modeling scenarios, it may be desirable to constrainthe displacement of a particular structure in one or more directions ata boundary of the solid mechanics physics. To simulate this scenario,the physics quantities and boundaries of the physics node 11810 mayinclude, for example, a fixed boundary condition node 11820 (e.g., FixedConstraint 1). In certain embodiments, selection of node 11820 mayreveal various exclusive associations or relationships with otherphysics quantity and/or boundary child nodes of the parent physics node11810. For example, selection of the fixed boundary condition node 11820can reveal a settings window 11830 that includes exemplary settings forfixed constraints associated with the physics node 11810. Selection ofnode 11820 may also reveal that the fixed boundary condition associatedwith node 11820 overrides certain functions associated with thePrescribed Displacement 1 node 11840.

To highlight or identify that node 11840 is overridden by anotheroperation along at least one of its boundaries, a first graphical marker11845, such as a solid downward facing arrow, may be situated next tothe graphical display of node 11840. The settings window 11830 for node11820 may also display information about the node and the geometricentity that the node 11820 may be acting on. For example, node 11820 isillustrated and described in the settings window 11830 as overriding thePrescribed Displacement 1 node 11840 along boundary number 35.

Selection of fixed boundary condition node 11820 can also reveal anassociation or relationship with another node, such as PrescribedAcceleration 1 node 11850. The association can be highlighted by asecond graphical marker 11855, such as a solid upward facing arrowsituated next to the graphical display of node 11850. In certainembodiments, the first and second graphical markers 11845, 11855 may bedynamically displayed in response to a user selecting a particular node,such as node 11820. While both nodes 11840 and 11850 are both associatedwith node 11820, the association between nodes can be different. Forexample, the Prescribed Acceleration 1 node 11850 overrides the fixedboundary condition node 11820. This override may be graphicallyillustrated to the system user by display of an upwardly pointing arrowfor second marker 11855 when node 11820 is selected. Furthermore, thesettings window 11830 that is displayed upon selection of node 11820 canalso display information about the geometric entity that overrides node11820. For example, node 11820 is illustrated and described in thesettings window 11830 as being overridden by the Prescribed Acceleration1 node 11850 along boundary number 32.

It is contemplated that in certain aspects of the present disclosure,the setting up a model, where certain nodes override other nodes forcertain domains, can be done graphically based on the ordering of nodes.Changes to which node overrides another can be made by reordering thenodes. For example, in FIG. 118, node 11840 is overridden by node 11820based on node 11820 being later on the list of child nodes below physicsnode 11810. Similarly, node 11850 overrides node 11820 based on node11850 being later or the lowest on the list of child nodes below physicsnode 11810. By allowing the reordering of nodes, the model can beadjusted in how one node may or may not override another node.

Based on the exemplary aspects described and illustrated for FIG. 118,it is contemplated that a model tree can include one or more exclusivenodes that override other nodes or operations for one or more domains ofa multiphysics problem. For contributions added to an equation that areconsidered exclusive, the contributions cannot coexist on a geometricdomain or boundary with other generated contributions. It iscontemplated that it may be desirable for exclusive contributions in therelationships or associations between the various nodes to begraphically presented to a system user. Then, by selecting a particularnode (e.g., node 11820), a system user is quickly presented withinformation in a model tree window 11805 of other nodes (e.g., nodes11840 and 11850) that are overridden by, or that override, the selectednode (e.g., node 11820). These relationships can be illustrated usinggraphical highlights, markers, or other identifiers. Furthermore, it iscontemplated that selection of nodes can also, or alternatively, includethe presentation of a setting windows (e.g., setting window 11830) thatidentifies domains (e.g., geometric entities 32 and 35) to which theexclusive nature of the various relationships or associations betweennodes and/or domains may apply.

Referring now to FIG. 119, an exemplary model tree is illustrated havinga plurality of model nodes that include the identification ofnon-exclusive operation(s) associated with a selected node. Similar toFIG. 118, an exemplary multiphysics model based on simulating thestructural aspects of a structure, such as an actuator, is illustrated,but the application can be readily applied to any of numerous physicsphenomena. Exemplary Model 1 node includes a physics node 11910 thatincludes physics quantities and boundary conditions associated withsolid mechanics aspects for the virtual structure. In the illustrated,non-limiting example, a load can be applied to a boundary, such as theboundary represented by Boundary Load 2 node 11920. Selection of node11920 may reveal various non-exclusive relationships or associationsbetween node 11920 and other nodes, such as Boundary Load 1 node 11940and Boundary Load 3 node 11950. The non-exclusive relationship may bethat Boundary Load 2 contributes a load, together with Boundary Load 1and Boundary Load 3, on a particular boundary of the structure beingsimulated. To highlight the non-exclusive relationship or associationbetween node 11920 and node 11940, a first graphical marker 11945, suchas an outline of a downward facing arrow, may be situated next to thegraphical display of node 11940 to symbolize that node 11940 contributestogether with node 11920 on at least one of the boundaries of the model.The arrow can be directed downward to identify that node 11920 is belownode 11940 and that in the sequence of operations, the operation fornode 11920 is after the operation for node 11940. To highlight thenon-exclusive relationship or association between node 11920 and node11950, a second graphical marker 11955, such as an outline of an upwardfacing arrow, may be situated next to the graphical display of node11950 to symbolize that node 11950 contributes together with node 11920on at least one of the boundaries of the model. The arrow can bedirected upward to identify that node 11920 is above node 11950 and thatin the sequence of operations, the operation for node 11920 is beforethe operation for node 11950. The settings window 11930 for selectednode 11920 may also display information about the node(s) and therelated non-exclusive operation(s). For example, node 11920 isillustrated and described in the settings window 11930 as contributingwith Boundary Load 1 node 11940 along boundary number 111 and ascontributing with Boundary Load 3 node 11950 along boundary number 98.

Based on the exemplary aspects described and illustrated for FIG. 119,it is contemplated that a model tree can include one or morenon-exclusive nodes or operations that contribute to the same domain orgeometric entity of the multiphysics model. It is contemplated that itmay be desirable for the non-exclusive contributions in therelationships or associations between the various nodes to begraphically presented to a system user via a GUI. By selecting aparticular node (e.g., node 11920), a system user can be quicklypresented with information in the model tree window 11905 of other nodes(e.g., nodes 11940 and 11950) that having a contributory affect on thesame model domain as the selected node (e.g., node 11920). Theserelationships can be illustrated using graphical highlights, markers, orother identifiers. Furthermore, it is contemplated that selection ofnodes can also, or alternatively, include the presentation of a settingwindows (e.g., setting window 11930) that identifies domains (e.g.,geometric entities 98 and 111) to which the contributory nature of thevarious relationships or associations between nodes may apply.

It is contemplated that in certain aspects of the present disclosure,the exemplary model tree window 11905 illustrated in FIG. 119 mayinclude situations in which a node or operation cannot be changed oraltered. A system user may also be able to select a particular node oroperation and have information associated with the selection displayed,such as in the settings window 11930. Similarly, the model tree window11905 can allow a system user the ability to review the settings of amultiphysics problem by selecting one geometrical entity at a time,which may allow information about all the nodes or operations thatcontribute to the equations associated with the selected geometricentity to be obtained. In one non-limiting example, a user may selectBoundary Load 2 node 11920, and then select Boundary 98 from theboundary selection list in settings window 11930. Upon selectingBoundary 98, nodes 11920 and 11940 may be highlighted or otherwiseidentified as contributing to the boundary conditions on Boundary 98. Incertain embodiments, a window (not shown) may also be displayedgraphically displaying boundary 98 of multiphysics problem with theboundary being highlighted.

Referring now to FIG. 120, an exemplary aspect of a model tree isillustrated comprising a plurality of model nodes 12030, 12080 for whichthe settings of each of the model nodes can be accessed to allow theformation and solving of a multiphysics problem on a multiphysicsmodeling system. The model nodes 12030, 12080 may generally representcomponents of a system being modeled in which the components aresimulated simultaneously. In certain embodiments, each of the pluralityof models may share some constituents of the multiphysics problem, suchas the ones represented by a study node 12060 and a results node 12070.For example, a first model node 12030 (e.g., Thermal Actuator) mayrepresent a thermal actuator activated by an electric current. Theelectric current may heat a part of the actuator causing thermalexpansion, which then yields a desired structural displacement. Theelectric current may be generated by an amplifier that is also beingsimulated in the multiphysics problem. The amplifier may be representedin a model tree as a second model node 12080 (e.g., Amplifier). Thephysical connection between the thermal actuator and the amplifier maybe described by an equation that sets a current output from the model ofthe amplifier equal to the current that drives the thermal actuator. Itmay also be represented by using a coupling operator, such as anoperator that determines the total value of the current at a boundary byintegrating the current density over this boundary. The value of thisintegral, representing the total current, may then be defined in anequation to be equal to the current output from the amplifier. It iscontemplated that in certain embodiments more than two model nodes maybe simulated by the multiphysics modeling system. As described multipletimes elsewhere herein, these exemplary embodiment provide an exampleonly of the model tree features in the multiphysics modeling system andare therefore non-limiting.

An exemplary aspect of the present disclosure includes a method foraccessing settings for forming and solving multiphysics problems in amultiphysics modeling system using a model tree. Nodes in the model treemay be used to represent the constituents of a multiphysics problem,such as the geometrical domain, the physical quantities, the physicalproperties, the boundary conditions, the mesh, the solver, and thesimulation results.

In another exemplary aspect of the present disclosure, the model treemay include one or more parent nodes having one or more child nodes. Thenodes may represent constituents of the problem to be solved by themodeling. In addition, nodes may further represent sequences of modelingoperations that generate constituents when the sequences are performed.Branches in the model tree may represent logical relations betweenoperations represented by parent nodes and child nodes.

In another aspect exemplary aspect of the present disclosure, a methodfor generating a model tree is based on input(s) entered by a user in aGUI associated with the multiphysics modeling system.

In yet another exemplary aspect of the present disclosure, a methodalters operations in a sequence of modeling operations while keepingother operations unchanged. The sequence of modeling operations may thenbe performed in order to update a multiphysics problem to reflect thealtered operations.

In a further exemplary aspect of the present disclosure, a physics nodein a model tree may represent a physical quantity and child nodesbranching from the physics node may represent operations that addcontributions to the physical quantities. The contributions may describephysical properties and boundary conditions.

In another exemplary aspect of the present disclosure, the contributionsmay be added to a multiphysics problem when they are attributed to ageometrical domain.

In yet a further exemplary aspect of the present disclosure, methodincludes several models represented by model nodes in a model tree. Themodel nodes may represent components that are connected in a systemwhere the several models may be simulated simultaneously. The differentmodels represented in the model tree may share constituents of amultiphysics problem, such as a solver and the simulation results.

As discussed elsewhere herein, the windows, menus, engineering andscientific phenomena, equations, parameters, and nodes illustrated inFIGS. 110-120 are non-limiting examples of model trees contemplated bythe present disclosure. It also would be understood in other physicsphenomena having different exemplary windows, menus, equations,parameters, and nodes are contemplated by the present disclosure, aswell. The windows, menus, equations, parameters, and nodes depend on thecomponents and physics phenomena being modeled. Therefore, it would beunderstood that FIGS. 110-120 provide non-limiting exemplaryrelationships for a model tree structure contemplated in a multiphysicsmodeling system that is capable of simultaneous modeling one or morecomponents having different properties.

According to one exemplary aspect of the present disclosure, a method isexecutable on one or more processors for implementing a bidirectionallink between a design system and a multiphysics modeling system. Themethod includes the acts of establishing via a communications link aconnection between the design system and the multiphysics modelingsystem. Instructions are communicated via the communication link. Theinstructions are configured to include commands for generating ageometric representation in the design system based on parameterscommunicated from the multiphysics modeling system.

It is contemplated that in certain aspects, communicating instructionsincludes sending and receiving instructions by both the multiphysicsmodeling system and by the design system. Communicating instructions canalso be implemented via dynamic link libraries. The design system andthe multiphysics modeling system may each have a separate dynamic linklibrary.

It is further contemplated that in certain aspects, in response to acommunicated instruction being received by the design system, files aregenerated files within the design system that contain a geometricrepresentation. In response to another communicated instruction beingreceived by the multiphysics modeling system, a geometrical domain isgenerated in the multiphysics modeling system using the files containingthe geometric representation and a determined geometric sequence. Amultiphysics problem may be defined using the geometrical domain.

It is also contemplated that in certain aspects, in response to acommunicated instruction being received by the multiphysics modelingsystem, parameters are sent for a multiphysics problem from themultiphysics modeling system. The parameters may define geometricfeatures for the design system. In certain aspects, the communicating ofinstructions includes sending parameter lists representing variations ingeometric features.

It is additional contemplated that in certain aspects, physicalproperties and boundary conditions are determined via associativity foreach variation to a defined multiphysics problem.

According to another exemplary aspect of the present disclosure, one ormore non-transitory computer readable storage media encoded withinstructions executable on one or more processors associated with abidirectional link between a design system and a multiphysics modelingsystem. The instructions include the acts of implementing abidirectional link between a design system and a multiphysics modelingsystem. The acts further include detecting the design system, andcommunicating instructions between the detected design system and themultiphysics modeling system. The instructions include commanding thedesign system to generate a geometric representation based on parametersreceived from the multiphysics modeling system.

It is contemplated that in certain aspects, the communicating ofinstructions includes sending and receiving instructions by themultiphysics modeling system or the design system. The communicating ofinstructions may be implemented via dynamic link libraries. The designsystem and the multiphysics modeling system may each have a separatedynamic link library.

It is further contemplated that in certain aspects, in response to acommunicated instruction being received by the design system, files aregenerated within the design system that contain a geometricrepresentation. It is also contemplated that in certain aspects,physical properties and boundary conditions are determined viaassociativity for predetermined variations to a defined multiphysicsproblem.

According to another exemplary aspect of the present disclosure, asystem is configured to establish a bidirectional link between a designsystem and a multiphysics modeling system. The system includes one ormore memory components configured to store a design system dynamic linklibrary and a multiphysics modeling system dynamic link library. Acontroller is operative to detect an installation of the design system,and implement via the dynamic link libraries, bidirectionalcommunications of instructions between the design system and themultiphysics modeling system.

It is contemplated that in certain aspects, the controller is furtheroperative to generate files within the design system that contain ageometric representation. The controller may further be operative tosend parameter lists representing variations in geometric features. Inaddition, the controller may also be operative to determine, viaassociativity, physical properties and boundary conditions for eachvariation to a defined multiphysics problem. In certain aspects, asolution to a defined multiphysics problem may be determined using aniterative process including mapping geometries between each iteration.

According to one exemplary aspect of the present disclosure, a methodfor controlling settings of a design system is executable on one or moreprocessors associated with the design system. The method includes theacts of detecting via a communications interface a multiphysics modelingsystem. Instructions are transmitted via the communication interface oranother interface. The instructions include model settings related to amultiphysics model at least partially residing in the multiphysicsmodeling system. Model results are received that are at least partiallyderived from the transmitted model settings. At least a portion of thereceived model results are displayed in a graphical user interfaceassociated with the design system.

It is contemplated that in certain aspects, the transmitting andreceiving acts are implemented via a bridge connection establishedbetween the multiphysics modeling system and the design system. Incertain aspects, the multiphysics model is at least partiallyrepresented in the graphical user interface via a model tree.

It is further contemplated that in certain aspects, a window isgenerated in the graphical user interface associated with the designsystem. The window may be least partially linked with the multiphysicsmodeling system. A window may also be generated in the graphical userinterface associated with the design system. The window may beconfigured to display model settings via a model tree. The model settingcan include at least a portion of the transmitted instructions.

It is also contemplated that in certain aspects, transmittinginstructions can include transmitting geometric features. A geometricrepresentation of the multiphysics model may be generated that is atleast partially based on the transmitted geometric features. Thegeometric representation may be generated in the design system.

According to another exemplary aspect of the present disclosure, amethod executable on one or more processors associated with amultiphysics modeling system dynamically controls the multiphysicsmodeling system. The method includes the acts of detecting a designsystem via a first interface. Instructions are received via one or moreinterfaces. The instructions include settings related to a multiphysicsmodel associated with the multiphysics modeling system. A solution isdetermined for the multiphysics model at least partially based on thereceived instructions. The solution is transmitted to at least one ofthe one or more interfaces. The solution is configured for displaywithin a design system user interface that is associated with the designsystem.

It is contemplated that in certain aspects, the receiving andtransmitting acts are implemented via a bridge connection between themultiphysics modeling system and the design system.

It is further contemplated that in certain aspects, in response toreceiving an instruction associated with a geometric representation, ageometric domain is generated in the multiphysics modeling system. Incertain aspects, the act of defining a multiphysics problem may includeusing the generated geometrical domain.

It is also contemplated that in certain aspects, parameters aretransmitted describing geometric features associated with the generatedgeometrical domain to the design system. In certain aspects, parameterlists are transmitted representing variations in the geometric features.

It is additionally contemplated that in certain aspects, physicalproperties and boundary conditions are determined, via associativity,for each variation to a defined multiphysics problem.

According to another exemplary aspect of the present disclosure, one ormore non-transitory computer readable storage media are encoded withinstructions executable on one or more processors associated with adesign system. The instructions include the acts of receiving a signalvia a communications interface. The signal is associated with amultiphysics modeling system. Instructions are sent to thecommunications interface or another interface. The instructions includesettings related to a multiphysics model associated with themultiphysics modeling system. Multiphysics model results derived fromthe settings are received. The multiphysics model result are displayedin a design system user interface.

According to a further exemplary aspect of the present disclosure, amethod for controlling settings of a design system is executable on oneor more processors associated with the design system. The methodincludes the acts of establishing a communications link between thedesign system and an associated multiphysics modeling system.Instructions are transmitted via the communications link or anotherlink. The instructions include settings related to a multiphysics modelassociated with the multiphysics modeling system. Multiphysics modelresults derived from the settings are received. The multiphysics modelresults are displayed in a design system user interface.

It is contemplated that in certain aspects, the transmitting andreceiving acts are executed via a bridge connection.

It is further contemplated that in certain aspects, the multiphysicsmodel in the design system user interface is represented using a modeltree. In certain aspects, a window is generated in the design systemuser interface that is related to the multiphysics modeling system. Thewindow is associated with the settings and the model tree includes atleast a portion of the instructions for the settings.

It is also contemplated that in certain aspects, transmittinginstructions includes sending geometric features. In certain aspects, ageometric representation is generated in the design system.

According to another exemplary aspect of the present disclosure, amethod for dynamically controlling a multiphysics modeling system isexecutable on one or more processors associated with the multiphysicsmodeling system. The method includes the acts of establishing one ormore communications channels between the multiphysics modeling systemand an associated design system. Instructions are received via the oneor more communications channels. The instructions include settingsrelated to a multiphysics model associated with the multiphysicsmodeling system. An outcome is determined for the multiphysics modelbased on the received instructions. The outcome is sent to at least oneof the one or more communication channels. The outcome is configured fordisplay in a design system user interface.

According to one exemplary aspect of the present disclosure, a methodexecutable on one or more processors associated with a multiphysicsmodeling system generates a model tree structure for the multiphysicsmodeling system. The multiphysics modeling system is configured to modelcombined systems having physical quantities represented in terms ofpartial differential equations. The method includes the acts ofreceiving an input associated with a selection of space dimensions forat least one of the combined systems. A plurality of selectable physicsoptions for association with at least one of the combined systems aretransmitted for display on a user interface. An input associated with aselection of at least one of the plurality of selectable physics optionsis received. One or more selectable study options for association withthe combined systems are transmitted for display on the user interface.An input associated with a selection of at least one of the one or moreselectable study options is received. In response to receiving the inputassociated with the selection at least one of the one or more selectablestudy options, a model tree structure is generated. The model treestructure includes a plurality of selectable nodes and subnodes. Theselectable nodes and subnodes include fields for storing physicalquantities and operations for modeling the combined systems.

It is contemplated that in certain aspects, the selectable nodes andsubnodes are configured for display on a user interface associated withthe multiphysics modeling system. In certain aspects, the model treestructure includes exclusive and non-exclusive subnodes. The exclusiveand non-exclusive subnodes may be labeled with symbols distinguishingthe exclusive subnodes from the non-exclusive subnodes anddistinguishing the exclusive and non-exclusive subnodes from othersubnodes in the model tree.

It is also contemplated that in certain aspects, in response toreceiving an input associated with the selection of a node or subnode,an identifying setting of a geometric entity associated with theselected node or subnode is displayed. Information about exclusive ornon-exclusive subnodes related to the selected node or subnode may befurther displayed.

According to another exemplary aspect of the present disclosure, amethod for solving a multiphysics model in a multiphysics modelingsystem is executed on one or more processor associated with themultiphysics modeling system. a multiphysics modeling system generates amodel tree structure for the multiphysics modeling system. Themultiphysics model includes combined systems having physical quantitiesrepresented in terms of partial differential equations. The multiphysicsmodeling system is configured to receive model inputs via a model tree.The method includes generating a geometric representation of thecombined systems. The geometric representation is at least partiallybased on data received via a geometry node. Physical properties for thegeometric representation of the combined systems are assembled. Thephysical properties are at least partially based on data received via amaterials node. Physics quantities and boundary conditions are assembledfor one or both of the geometric representation and the physicalproperties of the combined systems. The assembling of the physicsquantities and boundary conditions are at least partially based onselected physics options received via a physics node. A solution for themultiphysics model of the combined systems is generated. The solution isbased on partial differential equations for one or more study stepsassociated with a set of partial differential equations for theassembled physics quantities and boundary conditions. The study stepsare received via a study node. The geometry node, materials node,physics node, and study node are logically associated branches of amodel tree for the multiphysics model.

It is contemplated that in certain aspects, exclusive and non-exclusivecontributions to the partial differential equations are generated usingoperations represented by exclusive and non-exclusive child nodes to oneor more of the geometry node, the materials node, or the physics node ofthe model tree. In certain aspects, the exclusive and non-exclusivesubnodes are labeled with symbols distinguishing the exclusive subnodesfrom the non-exclusive child nodes and distinguishing the exclusive andnon-exclusive child nodes from other nodes in the model tree.

It is also contemplated that in certain aspects, in response toselecting a node, an identifying setting of a geometric entityassociated with the selected node is displayed and information aboutexclusive or non-exclusive child nodes related to the selected node arefurther displayed.

It is further contemplated that in certain aspects, the solution isdisplayed on a user interface and is configured to be displayed in a 2-Dgraphical form. In certain aspects, the solution is configured to bedisplayed in a 3-D graphical form or tabular form. In certain aspects,the geometry node, the materials node, the physics node, and the studynode are each selectable via a user interface and include fields forstoring physical quantities and operations for modeling the combinedsystems.

According to a further exemplary aspect of the present disclosure, oneor more non-transitory computer readable storage media are encoded withinstructions executable on one or more processors associated with amultiphysics modeling system. The instructions include the acts ofgenerating a geometric representation of the combined systems. Thegeometric representation is at least partially based on data receivedvia a geometry node. Physical properties are assembled for the geometricrepresentation of the combined systems. The physical properties are atleast partially based on data received via a materials node. Physicsquantities and boundary conditions are assembled for one or both of thegeometric representation and the physical properties of the combinedsystems. The assembling of the physics quantities and boundaryconditions are at least partially based on selected physics optionsreceived via a physics node. A solution is generated for themultiphysics model of the combined systems. The solution is based onpartial differential equations for one or more study steps associatedwith a set of partial differential equations for the assembled physicsquantities and boundary conditions. The study steps are received via astudy node. The geometry node, materials node, physics node, and studynode are logically associated branches of a model tree for themultiphysics model.

According to another aspect of the present disclosure, a method forgenerating model constituents associated with a multiphysics model via amultiphysics modeling system is executed on one or more processors. Themethod includes representing a plurality of model constituents as one ormore selectable primary nodes of a model tree. Operations that generatethe model constituents are represented as one or more selectablesecondary nodes to the primary nodes. Physical quantities associatedwith said model constituents are represented via at least one of theselectable primary nodes of the model tree. Contributions to partialdifferential equations are generated in the multiphysics modeling systemvia operations represented as at least one of the selectable secondarynodes to the at least one of the selectable primary nodes.

It is contemplated that in certain aspects, the multiphysics modelincludes a geometrical domain. The partial differential equations aregenerated only if attributable to the geometrical domain.

It is also contemplated that in certain aspects the method also includesrepresenting combined systems as a plurality of model nodes in the modeltree. Equations operable to couple the plurality of model nodes may begenerated via operations represented as secondary nodes to the modelnodes.

It is further contemplated that in certain aspects contributions to thepartial differential equations are generated for each of the modelnodes. The partial differential equations may be solved simultaneouslyby the multiphysics modeling system.

It is also contemplated that in certain aspects the method also includesgenerating exclusive and non-exclusive contributions to the partialdifferential equations using operations represented by exclusive andnon-exclusive secondary nodes of the model tree. In certain aspects, theexclusive and non-exclusive subnodes may be labeled with symbolsdistinguishing the exclusive subnodes from the non-exclusive subnodesand distinguishing the exclusive and non-exclusive secondary nodes fromother nodes in the model tree. In certain aspects, in response toselecting a primary node or secondary node, an identifying setting isdisplayed of a geometric entity associated with the selected node andinformation about exclusive or non-exclusive secondary nodes related tothe selected node may further be displayed.

It is additionally contemplated that the informational aspects aboutcertain operations in the model tree may be displayed for the nodes ofthe model tree. Information about the author or the source of theoperation represented by a particular node in the model tree may bepresented or be selectable in the setting window.

According to another aspect of the present disclosure, one or morephysical products or systems (e.g., mechanical devices, electricaldevices, electromechanical devices, structures, electromagnetic devices,chemical compounds, combinations of one or more of the foregoing) aredesigned and/or produced using the design system and/or multiphysicsmodeling system processes and/or methods described herein.

According to yet another aspect of the present disclosure, one or morenon-transitory computer readable media are encoded with instructions,which when executed by at least one processor associated with a designsystem or a multiphysics modeling system, causes the at least oneprocessor to perform the methods described herein.

Each of these embodiments and obvious variations thereof is contemplatedas falling within the spirit and scope of the claimed invention, whichis set forth in the following claims.

1-16. (canceled)
 17. A system configured to establish a bidirectionallink between a design system and a multiphysics modeling system, thesystem comprising: one or more memory components configured to store adesign system dynamic link library and a multiphysics modeling systemdynamic link library; and a controller operative to: detect aninstallation of the design system, and implement via the dynamic linklibraries, bidirectional communications of instructions between thedesign system and the multiphysics modeling system.
 18. The system ofclaim 17, wherein the controller is further operative to generate fileswithin the design system that contain a geometric representation. 19.The system of claim 17, wherein the controller is further operative tosend parameter lists representing variations in geometric features. 20.The system of claim 17, wherein the controller is further operative todetermine, via associativity, physical properties and boundaryconditions for each variation to a defined multiphysics problem. 21.(canceled)
 22. The system of claim 17, wherein the multiphysics modelingsystem is a finite element multiphysics modeling system.
 23. A methodexecutable on one or more physical processors for implementingcommunications between a computer aided design (CAD) system and amultiphysics modeling system, the method comprising the acts of:establishing, via at least one of the one or more physical processors, abidirectional link communicatively connecting a CAD system and amultiphysics modeling system, the bidirectional link residing in one ormore non-transitory computer readable media, the bidirectional linkproviding direct communication between a first user interface of themultiphysics modeling system and a second user interface of the CADsystem, the bidirectional link further communicatively connecting with asimulation module of the multiphysics modeling system; generating,within the CAD system, a geometric representation of a physical system,the geometric representation including a plurality of geometricentities; defining, within the CAD system, selections of one or more ofthe plurality of geometric entities of said geometric representation;transmitting geometric data from the CAD system to the multiphysicsmodeling system via the bidirectional link, the geometric datarepresentative of at least some of the geometric representations of thephysical system, at least a portion of the transmitted geometric databeing used in the multiphysics modeling system to generate a geometricaldomain, including geometric entities; and transmitting selection datafrom the CAD system to the multiphysics modeling system via thebidirectional link, the transmitted selection data representative of atleast some of the defined selections for one or more of the plurality ofgeometric entities, the transmitted selection data further being used todefine selections in the multiphysics modeling system for one or more ofthe plurality of geometric entities.
 24. The method of claim 23, furthercomprising the act of displaying in the first user interface a graphicalrepresentation of the geometric data transmitted from the CAD system.25. The method of claim 23, further comprising the act of displaying inthe first user interface representations of the transmitted selectiondata.
 26. The method of claim 23, further comprising the act ofdisplaying in the second user interface representations of the definedselections.
 27. The method of claim 23, wherein the generating withinthe CAD system of the geometric representation of the physical system isbased on parameters communicated via the bidirectional link from themultiphysics modeling system configured for modeling the physicalsystem, and wherein the act of transmitting is part of an iterativeprocess that includes communicating first instructions from themultiphysics modeling system to the CAD system, the first instructionsincluding first commands for generating a first geometric representationin the CAD system based on one or more first parameters determined bythe multiphysics modeling system, the multiphysics modeling systemincluding an optimization process for automatically determining one ormore updated parameters based on the one or more first parameters, andwherein the iterative process further includes communicating secondinstructions from the multiphysics modeling system to the CAD system,the second instructions including second commands for generating anupdated geometric representation in the CAD system based on the one ormore updated parameters.
 28. The method of claim 23, wherein theselections are user-defined.
 29. The method of claim 23, wherein theselections are based on material properties of the physical system. 30.The method of claim 23, wherein the selections are based on physicalproperties of the physical system.
 31. The method of claim 23, whereinone or more boundary conditions are defined for at least some of theselections.
 32. The method of claim 23, wherein the selections arerepresented as one or more nodes in a model tree in the multiphysicsmodeling system
 33. The method of claim 23, wherein the selections inthe multiphysics modeling system for the geometric representation areassociated, via associativity mapping, to selections in the CAD systemfor the geometric representation, and wherein associativity mapping datais communicated from the CAD system to the multiphysics modeling systemvia the bidirectional link.
 34. The method of claim 27, whereinselections in the CAD system for the geometric representation areupdated, via associativity mapping, to selections in the CAD system forthe updated geometric representation, the updated geometricrepresentation being based on the one or more updated parameterscommunicated via the bidirectional link from the multiphysics modelingsystem.
 35. The method of claim 27, wherein geometric entities in thegeometric representation in the CAD system are updated, viaassociativity mapping, to geometric entities in the updated geometricrepresentation in the CAD system, the updated geometric representationbeing based on the one or more updated parameters communicated via thebidirectional link from the multiphysics modeling system.
 36. The methodof claim 23, wherein the multiphysics modeling system is a finiteelement multiphysics modeling system.